If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to Disable the sequence number with existing Table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-04, 06:38
Balasubramanim Balasubramanim is offline
Registered User
 
Join Date: Jan 2004
Location: chennai
Posts: 1
How to Disable the sequence number with existing Table

Hi guys,
I am new to DB2. I am working on the project of data migration. we have a requirement of data migration on everyday basis.

Table yyyy which has auto generation column like

CREATE TABLE yyyy (acc_Number INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE),....

my question is, I wanted to disable/drop the auto generation key on "acc_Number" before doing insertion. Then after insertion i have to enable/recreate the generated key on the same "acc_Number" field.

Reply to this posting is highly appreciated.

with regards,
Bala
Reply With Quote
  #2 (permalink)  
Old 01-07-04, 07:09
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: How to Disable the sequence number with existing Table

Refer to SET INTEGRITY statement in SQL Reference ..

Your statement may look like

SET INTEGRITY FOR yyyy OFF

HTH

Cheers
Sathyaram
Quote:
Originally posted by Balasubramanim
Hi guys,
I am new to DB2. I am working on the project of data migration. we have a requirement of data migration on everyday basis.

Table yyyy which has auto generation column like

CREATE TABLE yyyy (acc_Number INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE),....

my question is, I wanted to disable/drop the auto generation key on "acc_Number" before doing insertion. Then after insertion i have to enable/recreate the generated key on the same "acc_Number" field.

Reply to this posting is highly appreciated.

with regards,
Bala
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On