473,320 Members | 1,867 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,320 software developers and data experts.

Loading datetime values from SYBASE into DATE type in DB2

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
1 2782
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tom | last post by:
Hi, I have a DB table in which has 2 attributes: 1. RegistrationDate datetime 2. IsApproved bit //Approved = 0; Not approve = 1 Now, I need to get and set their values in cs...
1
by: David Lozzi | last post by:
Howdy, I am trying to accomplish the following: dim DateSend as date if txtDateSend.text = "" then DateSend = dbnull.value else DateSend = txtDateSend.text
9
by: Phil B | last post by:
I am having a problem with a datetime from a web services provider The provider is sending the following SOAP response <?xml version="1.0" encoding="utf-8"?> <soap:Envelope...
4
by: Anne Catterick | last post by:
Hi, I have an british ASP.Net 2.0 application which is doing what (should) be very simple. But I am having issues. On my page I have a GridView as follows (some tags excluded for easy...
11
by: Axel Dahmen | last post by:
Hi, I'm working in a team developing an international website. When I set the page's CultureInfo to Hungarian (hu-HU) then the RangeValidator doesn't seem to be able to parse a TextBox's date...
4
by: Arpan | last post by:
A SQL Server 2005 DB table has 4 columns namely "ID" (IDENTITY int column), "FirstName" (varchar(50)), "LastName" (varchar(50)) & "DOB" (datetime). Now when I am trying to add a new row using the...
9
by: Tony Van | last post by:
They're driving me nuts, especially with the Datareader. There are times when I want to pass a null date on to a date variable and I have to cast the null as a date!!!??? I'm wondering if I...
6
by: rn5a | last post by:
I am inserting records in a MS-Access database table. The data type of one of the columns named *OrderDate* in the DB table is Date/Time. This is the SQL query I am using to insert the records in...
24
by: rn5a | last post by:
The date in my local machine is set to the dd/MM/yyyy format. When I insert a date in a MS-Access DB table, it gets populated in the above format. For e.g. if the date is, say, 8th March 2007, it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.