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

Loading datetime values from SYBASE into DATE type in DB2

P: n/a
Hi all,

I am trying to load data from a Sybase table with 'datetime' column
into a DB2 table with 'Date' type column? I used the following command
:

db2 "IMPORT FROM tabname.dat OF DEL MODIFIED BY COLDEL^ delprioritychar
TIMESTAMPFORMAT=\"MMM-DD-YYYY HH:MM:SS:UUUTT\" DATEFORMAT=\"MMM DD
YYYY\" REPLACE INTO tabname"

However i am getting these errors:

SQL3128W The field containing "Jan 1 2001 12:00:00:000AM" in row "15"
and
column "21" was truncated into a DATE field because the data is longer
than
the database column.

SQL3148W A row from the input file was not inserted into the table.
SQLCODE
"-180" was returned.

SQL0180N The syntax of the string representation of a datetime value
is
incorrect. SQLSTATE=22007
Can this be done some way? Please help ASAP....

Regards,
Sandy.

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
sandip wrote:
Hi all,

I am trying to load data from a Sybase table with 'datetime' column
into a DB2 table with 'Date' type column? I used the following command
:

db2 "IMPORT FROM tabname.dat OF DEL MODIFIED BY COLDEL^ delprioritychar
TIMESTAMPFORMAT=\"MMM-DD-YYYY HH:MM:SS:UUUTT\" DATEFORMAT=\"MMM DD
YYYY\" REPLACE INTO tabname"

However i am getting these errors:

SQL3128W The field containing "Jan 1 2001 12:00:00:000AM" in row "15"
and
column "21" was truncated into a DATE field because the data is longer
than
the database column.

SQL3148W A row from the input file was not inserted into the table.
SQLCODE
"-180" was returned.

SQL0180N The syntax of the string representation of a datetime value
is
incorrect. SQLSTATE=22007
Can this be done some way? Please help ASAP....

Regards,
Sandy.


fiugure out how long your strings are and modify the database to this
length.

cu,

indika
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.