Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date range from another database

Status
Not open for further replies.

safari7391

Programmer
Apr 29, 2003
33
US
SQL Server 2000
Enterprise Manager
DTS
Importing Data from an Informix Database
Importing 1 Table, Table Name – root_dagent
Connecting to the Informix database from a System DSN ODBC connection
row_date is a datetime field, also sql server look at it as a smalldatetime field

I am trying to use the following SQL Statement below to import some data from an Informix database to a SQL database, but its not working. Having problems with the where statement

SQL Statement
select dagent.row_date, dagent.logid, dagent.split, dagent.acdcalls, dagent.acdtime, dagent.acwtime, dagent.holdtime, dagent.ti_stafftime, dagent.ti_auxtime, dagent.acwoutcalls, dagent.acwouttime, dagent.auxoutcalls, dagent.auxouttime
from dagent
where (row_date BETWEEN { fn NOW() } - 15 AND { fn NOW() } - 10)
order by dagent.row_date, dagent.logid

Here is the Errow message I am getting.

Error Message
DTSImport/Export Wizard Error

Error Source: Microsoft OLE DB Provider for ODBC Drivers

Error Description: [OpenLink][ODBC][Informix Server]A field in a datetime or interval value is incorrect or an illegal operation specified on datetime field. (-1263)

Context: Error calling Prepare on the command text.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top