Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date in where clause does not works

I am using this in my SQL script

From employees where firstname = 'Paul' and Submit_Date = '1/1/2011'

My query runs fine without the Submit_Date clause

Why doesnt my script run? I will appreciate a response. I checked if my date is being interpreted correctly and when I use the list box properties of Submit_date and select number I see values there which I believe are correct.

18 Replies
Anonymous
Not applicable
Author

What database is it?   SQL Server, Oracle, Access...?

If Oracle - see this, may it helps http://community.qlik.com/docs/DOC-1321

Not applicable
Author

Its oracle.

Anonymous
Not applicable
Author

In this case recommendation in my old document should help, give it a try.

Not applicable
Author

I am not sure I understand what is StartDate.

WHERE DATE_KEY <= TO_DATE('$(StartDate)', 'MM/DD/YYYY HH24:MI:SS');

So lets say I need a data load greater than 1/1/2012. How tomodify the above statement. My dates are in field Submit_Date

Anonymous
Not applicable
Author

In my example StartDate is a variable.  If you want a specific date, it will be

WHERE Submit_Date = TO_DATE('01/01/2012', 'MM/DD/YYYY HH24:MI:SS');

Not applicable
Author

I appreciate your continued help but still doesnt works. I know its frustrating.

SQL##f - SqlState: S0000, ErrorCode: 9021, ErrorMsg: [AR System ODBC Driver]Column not found. I tried the OLE DB driver but with the same result.

Anonymous
Not applicable
Author

Well, the error message is quite clear : "Column not found"

So, it is not exactly Submit_Date...  Check the field name.  Maybe SUBMIT_DATE?  Oracle is case-sensitive.

MayilVahanan

Hi

As per you mentioned in your first post,i think Submit_date is your column name. Qlikview is case sensitive. so please make sure your column name.

WHERE Submit_date = TO_DATE('01/01/2012', 'MM/DD/YYYY HH:mm:SS');

and make sure Submit_date is in which format "MM/DD/YYYY" or "MM/DD/YYYY HH:mm:SS"

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

It is Submit_Date. I verified it.