Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Incremental loading problem

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
2 Replies

Re: Incremental loading problem

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

Re: Incremental loading problem

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

Community Browser