473,698 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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óóóóANK ARAóóó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="YYY Y-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 1584
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óóóóANK ARAóóó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="YYY Y-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
7625
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 file: ".$_FILES." -> $imagefile"); } else { enter record into database...
6
2305
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, data, input and output. The files all share the same table structures. Recently the input database started growing in size and it became necessary to compact the databases more frequently. Following the compact of the
0
1382
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 migrated the project. Now, everytime I access the resources to change a dialog or so, then, when I compile, the compiler halts with errors: Generating Code... Compiling resources... ..\Netcount.rc(1698) : error RC2135 : file not found: LANGUAGE...
2
3696
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 = myEsiCommand.ExecuteXmlReader(); reader.MoveToContent(); string myCSV = reader.ReadInnerXml(); //Load the xml fragment into the document XmlDocument xmlDataDoc = new XmlDocument();
3
4130
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 error: <FileName> cannot be accessed. The file may be read-only, or you may be trying to access a read-only location. Or, the server the document is stored on may not be responding.
1
2309
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: Public Class Form1 Inherits System.Windows.Forms.Form
9
1791
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 in the FE before compacting the BE. I shutdown the FE and then compact the BE. Open the FE and the data 'looks' corrupt. In data sheet view the first columns on the left are okay. Then the last several rows have been shifted to the right and some...
6
1471
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 object" The form is now completely blank and I can only see anything if I switch to design view. I am kaking changes that will break the form admittedly but those are bugs of course and I expect to be able to fix them.
5
2941
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 loading the gzip data! Im using the default buffer of the stream that i open on the 20GB gzipped file and pass it into the GZipStream ctor. then System.IO.Compression.GZipStream takes an hour! when just loading 50GB file of data takes a few minutes!
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
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...
0
9026
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
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
5860
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
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.