By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,137 Members | 2,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,137 IT Pros & Developers. It's quick & easy.

How do you get load to reject and not truncate data

P: n/a
I am try to find a way to get load to reject a record if the data is
too large and not just truncate it.

eg.

c:\temp\fred3.txt
------
a23456789012345678901234567890
b23456789012345678901234567890b234567890
db2 create table fred3 (a1 char(30))

db2 load from c:\temp\fred3.txt of del insert into fred3

SQL3501W The table space(s) in which the table resides will not be
placed in
backup pending state since forward recovery is disabled for the
database.
SQL3109N The utility is beginning to load data from file "c:\temp
\fred3.txt".
SQL3500W The utility is beginning the "LOAD" phase at time
"08/29/2007
08:59:27.842445".
SQL3519W Begin Load Consistency Point. Input record count = "0".
SQL3520W Load Consistency Point was successful.
SQL3125W The character data in row "2" and column "1" was truncated
because
the data is longer than the target database column.
SQL3110N The utility has completed processing. "2" rows were read
from the
input file.
SQL3519W Begin Load Consistency Point. Input record count = "2".
SQL3520W Load Consistency Point was successful.
SQL3515W The utility has finished the "LOAD" phase at time
"08/29/2007
08:59:28.278937".
SQL3107W There is at least one warning message in the message file.

Number of rows read = 2
Number of rows skipped = 0
Number of rows loaded = 2
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 2
C:\WINDOWS\system32>db2 select * from fred3

A1
------------------------------
a23456789012345678901234567890
b23456789012345678901234567890

2 record(s) selected.

What I am looking for is a way to accept record 1 and reject record 2

Aug 29 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.