|
|
Archives of the TeradataForum
Message Posted: Thu, 14 Apr 2005 @ 15:15:38 GMT
Subj: | | Why UPI on DBC.Acctg? |
|
From: | | teradatanewsgroup |
All,
can someone explain why the table DBC.Acctg is showing an UPI on AccountName ,UserName but has to be a NUPI as only VPROC will make it
unique?
A create table DBt_poweruser_uarndt.Acctg as DBC.Acctg with data; fails for this reason.
Ulrich
show sel *
from dbc.ampusage;
REPLACE VIEW DBC.AMPUsage
AS SELECT
AccountName,
UserName,
Cpu(NAMED CpuTime, FORMAT '---,---,---,--9.99'),
IO (NAMED DiskIO, FORMAT '---,---,---,--9'),
Vproc,
VprocType,
Model
FROM DBC.Acctg
WHERE
SUBSTR(DBC.Acctg.VprocType,1,3) = 'AMP' WITH CHECK OPTION;
CREATE SET TABLE DBC.Acctg ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL
(
AccountName CHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
UserName CHAR(30) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
CPU FLOAT FORMAT '---,---,---,--9.99' NOT NULL,
IO FLOAT FORMAT '--,---,---,--9' NOT NULL,
Vproc SMALLINT NOT NULL,
VprocType CHAR(4) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
Model CHAR(4) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL)
UNIQUE PRIMARY INDEX ( AccountName ,UserName );
--
Ulrich Arndt
www.data2knowledge.de
| |