Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Change the value of an IDENTITY Column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Change the value of an IDENTITY Column
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: 1013
Location: India

PostPosted: Thu Dec 30, 2010 5:04 am    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us