Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating Incremental Load from Cache Database

I am trying to create an incremental load from a Cache database.

Here is what I have so far -

Main :

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

set VSourceData = 'C:\Qlikview\Production\Data Echosystem\QVDs';

set VSaveQVD = 'C:\Qlikview\Production\QvIncludes';

Let vQVDCreateDate = QvdCreateTime('$(vSaveQVD)SunquestTAT.qvd');

Let vUpdateDate = Date('$(vQVDCreateDate)');

ODBC CONNECT TO CSQLULAB2010 (XUserId is FIYXbPNKZaUIVCVJFH, XPassword is BFLNRJFLTSYA);

Start of Incremental Load:

IncrementalSunquestTAT_Load1: // Naming file or routine

LOAD *;

SQL Select *

From SITE.U_GL_ACC_VIEW;

Store IncrementalSunquestTAT_Load1  into 'C:\Qlikview\Production\Data Echosystem\QVDs\IncrementalSunquestTAT_Load1.qvd';
// Storing initial load into local file

// Checking load against create date

// I cannot get this part to work!!

IncrementalSunquestTAT_Load1:

LOAD *;

SQL Select *

From SITE.U_GL_ACC_VIEW

Where ReceiveDateODBC >= $(vUpdateDate);

Any help will be immensely appreciated!

15 Replies
Not applicable
Author

Meani,

Apologies, but i accidentally rejected your request into the HC users group. Can you submit again and i can accept it this time?

matt

Colin-Albert

I would include a trace command to check that $(vUpdateDate) is formatted correctly

TRACE UPDATEDATE >$(vUpdateDate)< ;

You may need to use date() and /or date#() to convert to the correct format to match your database date fields.

Finally you may need to add single quotes around your where clause once the date format is correct.

From SITE.U_GL_ACC_VIEW

Where ReceiveDateODBC >= '$(vUpdateDate)' ;

Not applicable
Author

Thank you! I will give this a go.

Not applicable
Author

I apologize for my lack of knowledge. I am new to QlikView. I have no idea where to put the trace command. Would this go before the where clause or after?

Colin-Albert

I would put it on the line after

Let vUpdateDate= ....

Not applicable
Author

Thanks!

Not applicable
Author

Albert, this is the error that I am getting.

Colin-Albert

Hi Meani,

Oops - no error message

Not applicable
Author

“sqlcode:<-146> Unable to convert Date input to a valid Logical Date value”