473,383 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

db2 corrupts data while loading from a TXT file

Hi,

I have to deal with the following problem to increase the integrity of
our data. While doing a load to a DB2 table from a TXT file if there
is a double quote before the data that needs to be parsed, load parser
ignores the specified coldel delimeter. For instance,

"óERKEKóS02 ó0123456óóóóANKARAóóóYAŞIYORóTÜRKİYEóTÜRKİYE

gets loaded in a single column while it should be parsed into several
columns because of the specified coldel ó. Here is the load script
that I use. This loads appx 7 million rows in the table and I think
atmost a couple of hundred rows have this problem.

LOAD FROM /data/TEST.CUST_V.TXT OF DEL
MODIFIED BY DATEFORMAT="YYYY-MM-DD"
TIMESTAMPFORMAT="YYYY-MM-DD HH:MM:SS.UUUUUU"
COLDELó
WARNINGCOUNT 1000
MESSAGES /data/logs/TEST.CUST_V.LOG
REPLACE INTO TEST.CUST
STATISTICS YES AND INDEXES ALL NONRECOVERABLE INDEXING MODE
AUTOSELECT@
THANKS ALOT IN ADVANCE!!
METIN
Nov 12 '05 #1
1 1574
Metin Esat wrote:

Hi,

I have to deal with the following problem to increase the integrity of
our data. While doing a load to a DB2 table from a TXT file if there
is a double quote before the data that needs to be parsed, load parser
ignores the specified coldel delimeter. For instance,

"óERKEKóS02 ó0123456óóóóANKARAóóóYAŞIYORóTÜRKİYEóTÜRKİYE

gets loaded in a single column while it should be parsed into several
columns because of the specified coldel ó. Here is the load script
that I use. This loads appx 7 million rows in the table and I think
atmost a couple of hundred rows have this problem.

LOAD FROM /data/TEST.CUST_V.TXT OF DEL
MODIFIED BY DATEFORMAT="YYYY-MM-DD"
TIMESTAMPFORMAT="YYYY-MM-DD HH:MM:SS.UUUUUU"
COLDELó
WARNINGCOUNT 1000
MESSAGES /data/logs/TEST.CUST_V.LOG
REPLACE INTO TEST.CUST
STATISTICS YES AND INDEXES ALL NONRECOVERABLE INDEXING MODE
AUTOSELECT@

THANKS ALOT IN ADVANCE!!
METIN


Hi Metin,

You have to use - modified by chardel s.th -,
if your data can contain '"'s.

hth,
Wolfgang
Nov 12 '05 #2

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

Similar topics

5
by: neo002244 | last post by:
The move_uploaded_file() function is very quirky. I want to allow users to upload images to the Web site. Here is the code: if(!move_uploaded_file($_FILES, $imagefile)) { die("Could not move...
6
by: owengoodhew | last post by:
Hi, I am responsible for maintaining an MS Access 97 Database that reliably becomes corrupt following a compact......... About the Database: The database is made up of three linked databases,...
0
by: Pedro Lucas via .NET 247 | last post by:
I have a weird .RC corruption problem with MSVC .NET 2003. I have a .RC file that has been in use for years with .NET inside a project called Netcount. Recently I upgraded to .NET 2003 and...
2
by: Joseph | last post by:
Hello. I have this problem. See I have a transformed XML file and I checked its contents prior to outputting it to excel file via responseset. here is the gist of the code: XmlReader reader =...
3
by: Rik Moed | last post by:
Hi, I am having a problem with Excel 2003 worksheets when I upload them using the HtmlIputFile. After the upload, I start to download the worksheet and it appears to be currupt. I recieve the...
1
by: Angus Lepper | last post by:
I'm writing a stock ticker for a stock market simulation, and can load the data into the xmlreader in the first place, but can't figure out how to refresh/update the data in it. Any ideas? Code:...
9
by: Jeff | last post by:
This a little strange. The link in a FE database get corrupted when the BE get compacted, and the FE is not even open. I have checked. The data is fine in the BE. The data is fine in the link...
6
by: Deano | last post by:
Every once in a while I modify one particular form (could be anything from adding code to tweaking properties as far as I can see) and upon loading I get; "You can't assign a value to this...
5
by: DR | last post by:
Why is its substantialy slower to load 50GB of gzipped file (20GB gzipped file) then loading 50GB unzipped data? im using System.IO.Compression.GZipStream and its not maxing out the cpu while...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.