Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us