Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to reduce the data loaded from a table using the date field within it.
To avoid links to other tables using the same field name I have qualified the table but I think this is causing me the issue with my where statement.
Table is named SalesOrderLinesHistory (original table is orddeth)
Field is o-date (so appears as SalesOrderLinesHistory.o-date in the Qlik table view)
Qlik table shows SalesOrderLinesHistory.o-date column is formatted correctly as dd/mm/yyyy
ATTEMPT 1
I added WHERE "o-date" >= Date(27/04/2013);
after the FROM PUB.orddeth statement but I get the error:
SQL##f - SqlState: S1000, ErrorCode: 4294757240, ErrorMsg: [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL statement at or about "Date(27/04/2013)" (10713)
ATTEMPT 2
I added WHERE "o-date" >= 27/04/2013;
after the FROM PUB.orddeth statement but I get the error:
SQL##f - SqlState: S1000, ErrorCode: 4294947288, ErrorMsg: [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Inconsistent types (7481)
Have you tried with single quotes like:
WHERE o-date >= '27/04/2013' ; ?
Hi,
This error is related to the SQL syntax.
You must look at the SQL functions which will convert the text into date and then you can use that in SQL select statement.
Regards,
Kaushik Solanki
Can you elaborate please Kaushik ?
Thanks
Thanks for tresesco but I still get an error.
I believe the o-date field maybe loaded as text so the criteria may not be working.
use a variable
set x="Date(Date#('27/04/2013','DD/MM/YYYY'),'DD/MM/YYYY')";
WHERE o-date>='$(x)';
hth
Sasi