Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Import Wizard

Author  Topic 

Rach2009
Starting Member

37 Posts

Posted - 2010-02-24 : 10:11:13
Hi All,

I'm trying to create an import task in the wizard, and have got to the "Provide a Source Query" stage, where I type in:-

SELECT * FROM "DCSDBA"."SKU_AUDIT" WHERE "AUDIT_DSTAMP">= dateadd(day, datediff(day, 0, getdate()),-1) and "AUDIT_DSTAMP"< dateadd(day, datediff(day, 0, getdate()),0)

This statement seems to have a problem with the WHERE clause bit- as it will not parse and I get this message back

"DATEADD" invalid operator

Can I use DATEADD in this situation? I really just want the query to bring back data with the previous days date. Should I be including more ""?

The data source is Microsost OLE DB Provider for Oracle - in case this meakes any difference.

I would very much appreciate anyones help with this!!

Many Thanks

Rachel
   

- Advertisement -