Unanswered: Convert db2 dates in open query Mode & insert into sql server 2000 table
l'm trying to extract new cltnos on a daily basis from DB2 onto an sql server 2000 database.
l want to do the checking and exraction through
open query and insert the results into table A. This is the error that l get when l run this code
Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB provider 'MSDASQL'.
[OLE/DB provider returned message: [IBM][Client Access Express ODBC Driver
(32-bit)][DB2/400 SQL]SQL0204 - CONVERT in *LIBL type *N not found.]
OLE DB error trace [OLE/DB Provider 'MSDASQL' ICommandPrepare::Prepare returned 0x80040e14].
The desired result is when l compare the two l should get all the new clients for that day
But l don't know how to format the date and the time in Db2 so that l can get the daily
new clients using Today_date
SELECT Convert(Char(8),Getdate(),112) --:- result is 20031124
SELECT Convert(Char(8),Getdate(),112)+ ' 23:59:59.999' --:- result is 20031124 23:59:59.999
Where TSD100 Between Convert(Char(8),TSD100 ,112) AND
Convert(Char(8),TSD100 ,112)+ ''23:59:59.999''