Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

missing expression from SQL

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.

38 Replies
markgraham123
Specialist
Specialist
Author

maxgro

Can you please help here



markgraham123
Specialist
Specialist
Author

Throwing below error.

SQL##f - SqlState: S1000, ErrorCode: 905, ErrorMsg: [Oracle][ODBC][Ora]ORA-00905: missing keyword

sinanozdemir
Specialist III
Specialist III

Do you have LAST_UPDATE_DATETIME field in the table though?

markgraham123
Specialist
Specialist
Author

Yes Sinan.

sinanozdemir
Specialist III
Specialist III

What is the table name? Because you are using FROM Table, Table is a reserved word.

markgraham123
Specialist
Specialist
Author

The Table name is "Dealers"

I was just using a dummy name.

markgraham123
Specialist
Specialist
Author

SQL SELECT

*  

FROM  "Grade"."Dealers" Where DateTime(Cast(LAST_UPDATE_DATETIME) As Date) >= '10/28/2015';

sinanozdemir
Specialist III
Specialist III

Is it "Grade.Dealers"?

markgraham123
Specialist
Specialist
Author

Grade is the library and Dealers is the table.

I think that part is fine, i was getting trouble only with the format Sinan.

maxgro
MVP
MVP

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')