Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sql syntax problem

I´m having a problem with my sql sentence. It goes like this

SQL SELECT *
FROM 'MYTABLE'
WHERE [FromDate]="17-02-2011";

I get an error - ODBC access driver - to few parameters??????????

6 Replies
Not applicable
Author

the select works without the WHERE clause

prieper
Master II
Master II

Think that you are out of the SQL-syntax, the single aprostrophe and the square brackets also seem to belong to the Qlik-World. Most of SQL-drivers also expect the date to be delivered as MM/DD/YYYY. Thus try a statement like

SQL SELECT * FROM TableName_in_the_database WHERE "My Date" > "02/17/2011"


If still there are problems, try to eliminate the WHERE-clause and figure out, which date-format is required by your ODBC-driver.

HTH
Peter

Not applicable
Author

Hi Peter

I tried your statement, but get the same error.

The dates are not "dates" but textfields

Miguel_Angel_Baeyens

Hello,

Just make sure both field an value are in the same format in database:

SQL SELECT *FROM MYTABLEWHERE FromDate = '20100101';// Using YYYYMMDD or whatever the format is stored the field in


If you perform that query in your query analyzer, does it return the right records?

Hope that helps.

suniljain
Master
Master

SQL SELECT *
FROM 'MYTABLE'
WHERE FromDate= '17-02-2011';

Not applicable
Author

This suggestion also fails.

I´m sorry to say, that its my own problem, not telling you that the script is connected to a access database, so beeing a date the answer is

much like Sunils with a litte change

SQL SELECT *
FROM 'MYTABLE'
WHERE FromDate= #17-02-2011#;