October 30, 2003 at 5:12 pm
Hi there,
I hope someome can help me, as I'm clueless....
I am trying to transfer data from SQL Server 2000 to DB2 (windows) via DTS.
The first time it failed with "wrong number of parameters", which I couldn't figure out
because both target and source tables have 7 columns, and it was setup using the DTS wizard,
so I never changed anything.
However, then I changed one of the DB2 columns from LONG VARCHAR to VARCHAR (800),
(the SQL Server equivalent column is VARCHAR(8000)).
I ran the DTS package again and I got a different error "an invalid datetime format was
detected". My SQL Server table has 2 columns defined as DATETIME 8,
and my DB2 table has the same 2 columns defined as TIMESTAMP.
Any ideas? thanks.
October 30, 2003 at 8:09 pm
Don't know db2 but try setting the source as a query and converting the datetimes to
yyyymmdd hh:mm:ss
Cursors never.
DTS - only when needed and never to control.
Cursors never.
DTS - only when needed and never to control.
October 30, 2003 at 8:12 pm
How are dates formatted in db2? In SQL they are yyyy-mm-dd hh:mm:ss.nnn
If DB2 is different, you'll need to use CONVERT to put the in the right format.
Check "CAST and CONVERT" in Books Online.
Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface
--------------------
Colt 45 - the original point and click interface
October 30, 2003 at 10:19 pm
Thanks for your replies.
After more investigation, I think the problem has something to do with the null indicator, because if I populate the SQL Server table with a value in the DATE field, my DTS package works. But I want the field to contain NULLs.
Any other suggestions?
thanks.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply