Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 29 Oct 2007 @ 19:06:01 GMT

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

Subj:   Re: Generate unique id
From:   Matkar, Ankit


Since you are saying that the Ordered analytical functions are not working....The easiest thing that comes to mind is create a table with four columns-fd1,fd2,fd3 and a fourth column UNIQUE_ID which can be a IDENTITY column and can be defined as something like

                 (START WITH 1
                  INCREMENT BY 1
                  MINVALUE 1
                  MAXVALUE 2147483647
                  NO CYCLE)

Then you can insert all the unique values for fd1,fd2,fd3 and a null in the UNIQUE_ID column. The Unique_ID can thus be automatically generated for each unique combination of fd1,fd2 and fd3. You can then use this unieid by joining fd1,fd2 and fd3 per you need.

This may not be the best method but the first first thing that came to my mind.

  <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: 23 Jun 2019