Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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)' ;
Thank you! I will give this a go.
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?
I would put it on the line after
Let vUpdateDate= ....
Thanks!
Albert, this is the error that I am getting.
Hi Meani,
Oops - no error message
“sqlcode:<-146> Unable to convert Date input to a valid Logical Date value”