472,955 Members | 2,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

selecting data based on rowid

Machine : AIX 5.2
Product : UDB DB2 Release 8.1 FP4a

I have problem loading data into destination table. The data file is
huge with more than 6 Million records. This what i have done

1. Export the data into flat file (del format)
2. use the load command to load the data

At step 2, i found that there are some errors registered in the load
message files for a particular rowid. Please refer to the error below

SQL3125W The character data in row "6483140" and column "8" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "11" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "13" was
truncated
because the data is longer than the target database column.

SQL0180N The syntax of the string representation of a datetime value
is
incorrect. SQLSTATE=22007

As you can see at row 6483140 there are some errors at column level. To
look for this error, i cannot edit the data file as it is very huge and
not feasible to look for the row. The best part is that the source
table does not have any key field or index for me to manipulate the
data retrieval.

How do i extract the data of the row?

Please help.

Regards,
Uthuras

Nov 12 '05 #1
5 7236

<ut*****@hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Machine : AIX 5.2
Product : UDB DB2 Release 8.1 FP4a

I have problem loading data into destination table. The data file is
huge with more than 6 Million records. This what i have done

1. Export the data into flat file (del format)
2. use the load command to load the data

At step 2, i found that there are some errors registered in the load
message files for a particular rowid. Please refer to the error below

SQL3125W The character data in row "6483140" and column "8" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "11" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "13" was
truncated
because the data is longer than the target database column.

SQL0180N The syntax of the string representation of a datetime value
is
incorrect. SQLSTATE=22007

As you can see at row 6483140 there are some errors at column level. To
look for this error, i cannot edit the data file as it is very huge and
not feasible to look for the row. The best part is that the source
table does not have any key field or index for me to manipulate the
data retrieval.

How do i extract the data of the row?

Please help.

Regards,
Uthuras


I believe that the row number cited in the error messages is just the
ordinal number representing the position of that row within the input file,
i.e. it is the 6,483,140th record within the file; I don't think the message
is referring to any value that is on the row itself. Therefore, all you need
is an editor that can read a file that large and that shows line numbers.

I'm certain that the editor I use, Programmers File Editor (PFE), can do
both of those things, although there must be other editors with this capabil
ity. PFE only runs on Windows so if you want to give it a try, Google on
'Programmers File Editor': although it is no longer being developed, it is
still available on some archives, including
http://www.winsite.com/bin/Info?500000017700. If you are running another
operating system, ask on a newsgroup dedicated to that OS for
recommendations for an editor that can handle large files.

Rhino
Nov 12 '05 #2
ut*****@hotmail.com wrote:
Machine : AIX 5.2
Product : UDB DB2 Release 8.1 FP4a

I have problem loading data into destination table. The data file is
huge with more than 6 Million records. This what i have done

1. Export the data into flat file (del format)
2. use the load command to load the data

At step 2, i found that there are some errors registered in the load
message files for a particular rowid. Please refer to the error below

SQL3125W The character data in row "6483140" and column "8" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "11" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "13" was
truncated
because the data is longer than the target database column.

SQL0180N The syntax of the string representation of a datetime value
is
incorrect. SQLSTATE=22007

As you can see at row 6483140 there are some errors at column level. To
look for this error, i cannot edit the data file as it is very huge and
not feasible to look for the row. The best part is that the source
table does not have any key field or index for me to manipulate the
data retrieval.

How do i extract the data of the row?

Please help.

Regards,
Uthuras


If you can, use VIM, it can read 6MB+ files, but it takes some time to
read though. Also what you could try: 'cat -n <file> | grep <rownum>'
this only works if al the rows are on one line.
I don't know if you can execute em this way on AIX, but perhaps...

Also, in DB2 you could try a select on a subselect with rownum, even
though the line is truncated, it was still inserted in the database. And
with the content of this record you could grep on the file to see the
entire line...

-R-
Nov 12 '05 #3
Since your input to load is type DEL; you can add the "MODIFIED BY
DUMPFILE=........." clause to your load command. this will put the
rejected input record in its own file where you can easily edit it. Once
edited; you should have no problem inserting it into the table.
I believe that AIX, like most UNIX-like systems comes with the "sed"
command. You can use it to extract the specific record from the file and
examine it.

If you need to modify the file, dropping the "bad" record; then you can
get an exact count of the lines and use the "head" and "tail" commands
to rebuild the file without the bad one.

I've run into this situation before and have usually traced it to an
unexpected comma or quote in the offending record.
Phil Sherman

ut*****@hotmail.com wrote:
Machine : AIX 5.2
Product : UDB DB2 Release 8.1 FP4a

I have problem loading data into destination table. The data file is
huge with more than 6 Million records. This what i have done

1. Export the data into flat file (del format)
2. use the load command to load the data

At step 2, i found that there are some errors registered in the load
message files for a particular rowid. Please refer to the error below

SQL3125W The character data in row "6483140" and column "8" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "11" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "13" was
truncated
because the data is longer than the target database column.

SQL0180N The syntax of the string representation of a datetime value
is
incorrect. SQLSTATE=22007

As you can see at row 6483140 there are some errors at column level. To
look for this error, i cannot edit the data file as it is very huge and
not feasible to look for the row. The best part is that the source
table does not have any key field or index for me to manipulate the
data retrieval.

How do i extract the data of the row?

Please help.

Regards,
Uthuras


Nov 12 '05 #4
Back to your problems with SQL3025W. I got this problem a short time ago.
The reason in my case was that the delimiter priority has changed with one
of the V8 Fixpacks. So if your data contains line breaks in a varchar
column db2 now interprets this as regular delimiter for the import and cuts
your row.

If this could be your problem the easy answer is to use the import with
'MODIFIED BY DELPRIORITYCHAR'. This will force the import to use the old
priority - character, record, column.

Maybe this will help.
Nov 12 '05 #5
ut*****@hotmail.com wrote:
Machine : AIX 5.2
Product : UDB DB2 Release 8.1 FP4a

I have problem loading data into destination table. The data file is
huge with more than 6 Million records. This what i have done

1. Export the data into flat file (del format)
2. use the load command to load the data

At step 2, i found that there are some errors registered in the load
message files for a particular rowid. Please refer to the error below

SQL3125W The character data in row "6483140" and column "8" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "11" was
truncated
because the data is longer than the target database column.

SQL3125W The character data in row "6483140" and column "13" was
truncated
because the data is longer than the target database column.

SQL0180N The syntax of the string representation of a datetime value
is
incorrect. SQLSTATE=22007


What's the order in which you exported the rows? Using that order you can
find the rows in question in the original table:

SELECT *
FROM ( SELECT row_number() over(order by ...), ...
FROM <your_table> ) AS t(rn, ...)
WHERE rn IN ( 6483140, ... )

The "order by ..." should be the very same order by that you also used
during the export operation.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #6

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

Similar topics

8
by: Ilan | last post by:
Hi all I need to add data from two Excel sheets (both on the same workbook) to an existing table in my SQL DB. The problem is that each sheet holds different fields for the same record, though...
0
by: gustavo_randich | last post by:
Hello, I'm looking for a DB2 workaround on a topic already solved in Oracle: the problem of mutating tables (which states that a trigger action cannot read the triggering table's data). Yes, I...
3
by: Daryl J. Edwards | last post by:
I'm trying to set up a database that will do the following for me: 1) store part numbers, descriptions, and costs in one table (the easy part) 2) store "kits" - kits are groups of parts from the...
4
by: George | last post by:
Hi all, I am having trouble with updating my data in an Access database. here is my code: Imports System.Data.OleDb Dim AppPath As String = Mid(Application.ExecutablePath, 1,...
1
by: h0ffman | last post by:
Hi Hope you can help, been racking my brains on this. How can I pick a field from a group, based on the order of another field in the group? Not sure if that explains it so.. I have a table...
3
gregerly
by: gregerly | last post by:
Hello, I think this should be a simple answer, but I haven't found any good resource yet. I have an element that onclick I run a function, passing a reference to the object clicked. I then grab...
1
by: Amit | last post by:
Hello , Is there any way i can import data from datagrid to sqlserver. please advise . thanks & Regards
2
by: Blacky | last post by:
Hi, I am using c# asp.net application.I have datagrid which binds column dynamically and i make certain columns say visibility to false in my itemdatabound event EMPID AS E.ITEM.CELLS.VISIBLE =...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.