Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
So I am attempting to do incremental loads from an SQL
database with an ODBC connection. I have it working pulling from Excel, but
when I connect it to SQL instead, it is pulling every record instead of the
records I asked for in the ‘WHERE’ section.
I do not know if it is a syntax problem or if I am just
missing something, it seems to all be correct because it is pulling the
records, but it’s just pulling far too many. I have looked around on the forum
for similar problems but I am yet to see an answer.
I am hoping one of you can help me. Here is the code I am
using below:
LET vDateReload = Date(ReloadTime(),'DD/MM/YYYY hh:mm:ss[.fff]');
//----- Collect updated records -----
ODBC CONNECT TO Database (XUserId is “”, XPassword is “”);
TABLE:
LOAD
Now() as [QV Added],
*;
SQL SELECT *
FROM "Database".dbo."Table" WHERE "LAST_UPDATED" >= '$(vDateReload)';
Many thanks in advance,
Bruno
Try using convert function on '$(vDateReload)'
I have tried converting it to all sort of things. I have even tried to put an actual timestamp instead of the variable and it still loads everything. It is very odd..