|
|
Archives of the TeradataForum
Message Posted: Wed, 12 Apr 2006 @ 11:45:44 GMT
Subj: | | Re: Building row numbers |
|
From: | | McCall, Glenn David |
Would an identity column work for the third column in the DB.test table?
Thus:
> INS DB.Test SEL
> Name,ProductNumber,csum(1,1) as RowNumber
> FROM ABC.Atable
Would become
Insert into db.test (name, productnumber)
Select name, productnumber
>From abc.table;
And test is defined with something like
Create table test
Name varchar (40), /* Or whatever */
ProductNumber integer,
rowNumber integer generated always as identity
)
primary index (rowNumber);
| |