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 > rejecting rows

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-02-06, 07:23
dhuygu dhuygu is offline
Registered User
 
Join Date: Sep 2006
Posts: 20
rejecting rows

When I copy a table, which has nullable columns, rows are rejected.
How can I easily copy nullable columns?
Reply With Quote
  #2 (permalink)  
Old 10-02-06, 07:59
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Please provide DB2 version, OS, DDL of source table, DDL of target table and SQL you are using to copy.

Andy
Reply With Quote
  #3 (permalink)  
Old 10-02-06, 08:05
dhuygu dhuygu is offline
Registered User
 
Join Date: Sep 2006
Posts: 20
DB2 8.2
OS win32
I can copy all tables except tables which have nullable columns.
first I couldnt copy tables which have auto generated identity but then using alter ....set generated by default db2command it is okey.But now can not copying nullable columns
Reply With Quote
  #4 (permalink)  
Old 10-02-06, 08:10
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
How are you doing the copy. Please give specific detail. Your general description is not helpful. The DDl for the source, destination, and SQL you use to copy would help alot.

Andy
Reply With Quote
  #5 (permalink)  
Old 10-02-06, 08:25
dhuygu dhuygu is offline
Registered User
 
Join Date: Sep 2006
Posts: 20
I'm copying tables from one db to another db by sending db2 commands to db2clp from my .net application.
first I set the auto generate identity to generated by default by using alter command.
then export table with export command.
then import tables into new db with import command
I need db2command to copy tables contains columns that are nullable.I get this from this error:

SQL3550W The field value in row "1" and column "1" is not NULL, but the
target column has been defined as GENERATED ALWAYS.

SQL3550W The field value in row "2" and column "1" is not NULL, but the
target column has been defined as GENERATED ALWAYS.
Reply With Quote
  #6 (permalink)  
Old 10-02-06, 08:33
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Quote:
Originally Posted by dhuygu
SQL3550W The field value in row "1" and column "1" is not NULL, but the
target column has been defined as GENERATED ALWAYS.
Set it to "GENERATED ALWAYS BY DEFAULT"
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #7 (permalink)  
Old 10-02-06, 08:44
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You had a related question last week. Are you sure you are setting the identity on the destination properly, or are you doing that on the source. The message you are getting has to do with the column still being generate always. The nullable part has nothing to do with the message you are getting. What is the reason for the copy?

Andy
Reply With Quote
  #8 (permalink)  
Old 10-02-06, 09:41
dhuygu dhuygu is offline
Registered User
 
Join Date: Sep 2006
Posts: 20
yer you are right.error is about aouto generate.it is okey now.thank you very much
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