IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Change the value of an IDENTITY Column


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Dec 30, 2010 12:26 am
Reply with quote

Hi ,
I have a column defined as identity column in a table , now during a batch load process, i have requirement to load a child table which has this identity column set as the Foreign Key

Now to make the load process simple , can i prevent DB2 from generating the sequence ID and generate it on my own during the Bulk Loading alone.

Do let me know if my query is not clear
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 30, 2010 5:04 am
Reply with quote

Cvishu,


Alter the table to remove the identity column.

Thanks,
Sushanth
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Dec 30, 2010 11:44 am
Reply with quote

Sushanth thanks for the resposnse, i want to do this process only during the mass loading during a end-of-day process , after that during my on-line insert i will require the IDENTITY column.

Hope am expressing my query clearly , pls let me know if am confusing.

Thanks
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Dec 30, 2010 1:07 pm
Reply with quote

Hi ,
I just found that declaring a IDENTITY column with GENERATED BY DEFAULT instead of GENERATED ALWAYS option will resolve my problem .

Thanks all for your time .
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Extract ISPF table column headings CLIST & REXX 2
No new posts ISPF Table to add a new column TSO/ISPF 1
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:


Back to Top