Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 04 Oct 2010 @ 16:06:10 GMT


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


Subj:   Re: Forcing a manual value into an identity column
 
From:   John_Wight

Could we try to understand 'why' you are wanting to insert a column with a value of -1? What are you trying to do from a logical business perspective?

From what you gave us, it might appear your are trying to pair columns for a value and same negative value? OR, are you trying to get the 'logically previous' column to the one you are looking at? If it is the later case then you would not be able to use that with Identity columns. Even though Identity guarantees that you will have a 'unique value' - it does NOT give you 'sequential' numbers to the 'sequence' as it would in Oracle, etc.

However, you can do this if you sequence the rows with something like a ROW_NUMBER then join it to itself using the generated number -1 of the second set. etc.

Again - it's hard to provide a proper response unless we understand WHAT you are trying to do - i.e. not the detail mechanics, but the 'problem' you are trying to address;-)


JK



     
  <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