Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
SalesDate column is coming from database. I am trying to implement incremental load.
SalesDate values are 01SEP2016,01OCT2016, and so on.
I am using reloadtime() function.
LET lastReloadTime = num(date(ReloadTime(),'DDMMMYYYY'));
Data:
LOAD *
FROM
[..\QVD\Sales.qvd]
(qvd);
Concatenate
LOAD *;
SQL SELECT * FROM Sales_Table
where (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) > $(lastReloadTime));
Error Message:
expected something like ')' between the 'date' keyword and '('.
SQL SELECT * FROM Sales_Table
where (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) > 42647.496226852)
Please help me.
Hi,
Try this: where SalesDate> '04OCT2016'
if that works then use variable in quotes like : '$(lastReloadTime)'
HTH
Hi,
This might be due to (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY'))
why dont you simply use the date format of SalesDate field as it is and change the format of lastReloadTime accordingly..
HTH
Sushil
Hi Sushil,
My SalesDate is not in Date format in Qlikview. It is a character. That's why I am using format.
I followed your advise. Getting the below error message:
Syntax error, expected something like an 'OR' keyword or ')' between an integer and the word 'OCT2016'.
SQL SELECT * FROM Sales_Table
where (SalesDate> 04OCT2016)
Hi,
Try this: where SalesDate> '04OCT2016'
if that works then use variable in quotes like : '$(lastReloadTime)'
HTH
I've to ask one question before help. If your reload date is today. Then what output will come using this
LOAD *;
SQL SELECT * FROM Sales_Table
where (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) > $(lastReloadTime));
Might be this, I've added this >= and then try with single quotes or without single quotes
LOAD *;
SQL SELECT * FROM Sales_Table
where (num(date(Date#(SalesDate,'DDMMMYYYY'),'DDMMMYYYY')) >= '$(lastReloadTime)');
Hi Aretha
You can use To_Char function to convert the date format in database side.
Hi Mayil, Could you please provide the code. Thank you
Some thing like this : SELECT to_char(column_date, 'yyyy/mm/dd') from table;
Check this app.
I hope this might helps you.
-Nagarjun
!