Skip to main content
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.

1 Solution

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

View solution in original post

38 Replies
sinanozdemir
Specialist III
Specialist III

Are you using SQL Server? If so, the query should be like the below:

SQL SELECT

FROM  Table WHERE LAST_UPDATE_DATETIME >='2015-10-28';

maxgro
MVP
MVP

The function (datetime, ....) and format ('10/28/2015') after the SQL depends on the database, not QlikView;

what's the database?

markgraham123
Specialist
Specialist
Author

Maxgro,

It's SQL

markgraham123
Specialist
Specialist
Author

I tried that too bro.

But no luck, same error.

handry_orozco
Partner - Contributor III
Partner - Contributor III

Try,

Select *

From Table Where DateTime(Cast(Last_Uptdate_Datetime) As Date) >= '10/28/2015'

Bye

markgraham123
Specialist
Specialist
Author

SQL##f - SqlState: S1000, ErrorCode: 936, ErrorMsg: [Oracle][ODBC][Ora]ORA-00936: missing expression

markgraham123
Specialist
Specialist
Author

SQL##f - SqlState: S1000, ErrorCode: 936, ErrorMsg: [Oracle][ODBC][Ora]ORA-00936: missing expression

Not applicable

Graham,

Can you add Attribute names after your select statement & check this link.

https://community.qlik.com/thread/61385

Thanks

Brad.

markgraham123
Specialist
Specialist
Author

I tried that after checking that thread this morning
but no progress