473,804 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you get load to reject and not truncate data

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.t xt
------
a23456789012345 678901234567890
b23456789012345 678901234567890 b234567890
db2 create table fred3 (a1 char(30))

db2 load from c:\temp\fred3.t xt 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\syst em32>db2 select * from fred3

A1
------------------------------
a23456789012345 678901234567890
b23456789012345 678901234567890

2 record(s) selected.

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

Aug 29 '07 #1
0 1963

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11422
by: NOSPAM | last post by:
Hello, I am hoping you can help me with the following problem; I need to process the following steps every couple of hours in order to keep our Sql 2000 database a small as possible (the transaction log is 5x bigger than the db). 1.back-up the entire database 2.truncate the log 3.shrink the log 4.back-up once again. As you may have determined, I am relatively new to managing a sql server database and while I have found multiple...
1
3042
by: New MSSQL DBA | last post by:
I have recently been assigned to take over several MSSQL environments and found some of the existing practice confusing. As most of my previous experiences are on Oracle and Unix platform so would like your inputs and comments. 1) TX log truncate: In the existing environment, there are scheduled jobs to truncate transaction log of each database in the server and shrink them back to a desired size, say 1G. These jobs are all scheduled...
6
4328
by: JS | last post by:
EE instance DB2 v7.2.0 fixpack 3 on WIN2K. I select some data from a table A and write it to a file using the COALESCE function and whitespace as the null character: eg coalesce(col1, ' '). This column has 10,000 nulls in table A. Select count(*) from table A where col1 is null=10,000 Using the load utlity, I load the data file as follows into table B which has not null constraint on col1: LOAD FROM LOAD.TEST OF ASC MODIFIED BY...
2
48063
by: rdraider | last post by:
Hi, I am trying to create a script that deletes transaction tables and leaves master data like customer, vendors, inventory items, etc. How can I use TRUNCATE TABLE with an Exists? My problem is I have 200+ tables, if I simply use a list like: truncate table01 truncate table02 truncate table03 ....
5
2182
by: Konstantin Andreev | last post by:
Recently I became interested, - Are the data, bulk loaded in the table with LOAD utility, consume the same disk space as loaded with IMPORT utility? The answer turned out to be NOT ! Here is a nutshell description of the test. The testing was done at "DB2/LINUX 8.2.3". Tables for tests: F4106 has 5203 rows, 32 columns. F42199 has 1399252 rows, 245 columns.
1
1533
by: rcamarda | last post by:
As part of my data warehouse nightly build, I truncate my tables in my target database. As example, I find it is much quicker to do a bulk API load of 13M records and to do an update/insert of 100K rows. I also drop the indexes before the builds and reindex after. Thats an aside. What I am wondering is how is this impacting the statistics? Do I need to update them? Not well versed on statistics and any data is welcomed. Thanks Rob
14
12299
by: Sala | last post by:
Hi I want to truncate all data in database ... pls help me how i ll truncate?
15
7249
by: Sandham | last post by:
I have a series of tables in which the data can be refreshed from a file. Before refreshing the data, some of the tables are cleared using either TRUNCATE or DELETE. If TRUNCATE is used, any index which is not PRIMARY or UNIQUE appears to be disabled and is not updated when new data is inserted into the table. Performing an OPTIMIZE reactivates the index. If DELETE is used instead of TRUNCATE, this problem does not occur.
5
1091
by: Timothy Madden | last post by:
Hello I see there is now why to truncate a file (in C or C++) and that I have to use platform-specific functions for truncating files. Anyone knows why ? I mean C/C++ evolved over many years now, and still, people making _the_ standards never decided to include such a function. Even in POSIX it was included only in recent versions, mostly not fully supported yet.
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7642
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.