Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to fetch the records which were greater than 10/28/2015 05:10:55 PM from SQL through qlikview script.
I have field "Last updated Date time" which holds that value.
But when i use,
SQL SELECT
*
FROM Table WHERE DATETIME(LAST_UPDATE_DATETIME) >='10/28/2015';
It's throwing "missing expression from SQL" error.
Can some one please help me to get into the right format.
Throwing below error.
SQL##f - SqlState: S1000, ErrorCode: 905, ErrorMsg: [Oracle][ODBC][Ora]ORA-00905: missing keyword
Do you have LAST_UPDATE_DATETIME field in the table though?
Yes Sinan.
What is the table name? Because you are using FROM Table, Table is a reserved word.
The Table name is "Dealers"
I was just using a dummy name.
SQL SELECT
*
FROM "Grade"."Dealers" Where DateTime(Cast(LAST_UPDATE_DATETIME) As Date) >= '10/28/2015';
Is it "Grade.Dealers"?
Grade is the library and Dealers is the table.
I think that part is fine, i was getting trouble only with the format Sinan.
Your error says you're using an Oracle database;
but in Oracle I don't find a datetime function SQL Functions
maybe this if LAST_.... is a date
WHERE LAST_UPDATE_DATETIME >= to_date('28/10/2015', 'DD/MM/YYYY')
or
WHERE LAST_UPDATE_DATETIME > to_date('28/10/2015 00:00:00', 'DD/MM/YYYY HH:MI:SS')