I am using an ADO.NET source to transfer data from an ODBC server to my SQL. I used the import and export wizard to create my data flow task.
I need to add new entries that have the GPMTADDT> field (yesterday date) for example, if today 20121002 the following query works fine:
SELECT PARTICIP.* FROM PARTICIP WHERE GPMTADDT > 20121001
I tried:
SELECT PARTICIP.* FROM PARTICIP WHERE GPMTADDT > Format(now(),"yyyymmdd")
But this will not work, the server treats the "format" as a column. I tried to create @date variable
SELECT PARTICIP.* FROM PARTICIP WHERE GPMTADDT > @date
again, the server rejected the "@".
Also tried: SELECT PARTICIP.* FROM PARTICIP WHERE GPMTADDT > (SELECT MAX PARTICIP.GPMTADDT FROM PARTICIP)
I'm sure I missed something simple, help would be greatly appreciated.
Thanks!
source share