Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 12 Apr 2006 @ 11:45:44 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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);


     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023