Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incremental loading problem

Hello everybody,

I've a little problem with iocremental load, i load a data base's table like this:

fim_PIANO_DI_PRODUZIONE:

SQL SELECT *
FROM fim.dbo."PIANO_DI_PRODUZIONE"
order by ID_COMMESSA,DATA_ULT_RIC;

STORE fim_PIANO_DI_PRODUZIONE;

It's work very good, but this is a big table so i wan't to do an incremental loading so i do:

Let ThisExecTime = ReloadTime();

PIANO_DI_PRODUZIONE:
SQL SELECT *
FROM fim.dbo."PIANO_DI_PRODUZIONE"
WHERE DATA_ULT_RIC >= '$(ThisExecTime)';

But i have a problem to match the two dates:

DATA_ULT_RIC is a numeris date like 38504,405804804

and ReloadTime like '09/04/2013 05:45:12'

Have you got any ideas or solutions?

Thanks a lot

Quentin

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Just to make sure ThisExecTime gets a numeric value:

Let ThisExecTime = num(ReloadTime());

And then remove the quotes that surrounded $(ThisExecTime):

WHERE DATA_ULT_RIC >= $(ThisExecTime);


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Just to make sure ThisExecTime gets a numeric value:

Let ThisExecTime = num(ReloadTime());

And then remove the quotes that surrounded $(ThisExecTime):

WHERE DATA_ULT_RIC >= $(ThisExecTime);


talk is cheap, supply exceeds demand
Not applicable
Author

Hello Gysbert,

I don't know why but the problem is that the clause where don't work in the script.

I have testing an other solution that i find:

Let vLastExecTime = TIMESTAMP(ReloadTime(), 'YYYY-MM-DD hh:mm:ss.fff');

Let Query = 'SELECT * FROM fim.dbo."ORDINE_TAB" WHERE data_creazione > ' & CHR(39) & ' $(vLastExecTime) ' & CHR(39) & '';

FIM_ORDINE_TAB:

LOAD *;

SQL $(Query);

And it's work!

Thank you for your help.

Quentin