Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Load Only New Records from SQL

I want to load only new records. When I run this script, I get an error, but if I take out the Concatenate, it replaces the old QVD with the new criteria. What am I doing wrong?

thanks

CONCATENATE

LOAD *;

SQL SELECT *

FROM "GL_Transactions".dbo."GL_Transactions"

where [Transaction Effective Date] >='12/31/2016' ;

store GL_Transactions Into ....\qlikview\99.Shared_Folders\2.QVD\2.QVD_Data\GL_Transactions.qvd (qvd);

drop Table GL_Transactions;

1 Solution

Accepted Solutions
rsvebeck
Valued Contributor

Re: Load Only New Records from SQL

Concatenate syntax is like this :


concatenate(TableName)

load * From ...


Perhaps this is what you want:


GL_Transactions:

Load * from

\qlikview\99.Shared_Folders\2.QVD\2.QVD_Data\GL_Transactions.qvd (qvd);



CONCATENATE(GL_Transactions)

LOAD *;

SQL SELECT *

FROM "GL_Transactions".dbo."GL_Transactions"

where [Transaction Effective Date] >='12/31/2016' ;


store GL_Transactions Into ....\qlikview\99.Shared_Folders\2.QVD\2.QVD_Data\GL_Transactions.qvd (qvd);

 

               


4 Replies
jcampbell474
Contributor III

Re: Load Only New Records from SQL

Can you post the script for the previously loaded table?  I.e., The table you're concatenating to...

In the interim, you can try putting the previously loaded table's name in the Concatenate statement.

Concatenate (tablename)

rsvebeck
Valued Contributor

Re: Load Only New Records from SQL

Concatenate syntax is like this :


concatenate(TableName)

load * From ...


Perhaps this is what you want:


GL_Transactions:

Load * from

\qlikview\99.Shared_Folders\2.QVD\2.QVD_Data\GL_Transactions.qvd (qvd);



CONCATENATE(GL_Transactions)

LOAD *;

SQL SELECT *

FROM "GL_Transactions".dbo."GL_Transactions"

where [Transaction Effective Date] >='12/31/2016' ;


store GL_Transactions Into ....\qlikview\99.Shared_Folders\2.QVD\2.QVD_Data\GL_Transactions.qvd (qvd);

 

               


vishsaggi
Esteemed Contributor III

Re: Load Only New Records from SQL

Can you paste the full script you are running and what is the error you are getting can you screenshot the error ?

Not applicable

Re: Load Only New Records from SQL

That did it. I didn't want to reload every time from the SQL database, but the code provided only reloads from the QVD which is what I wanted.

Thanks!