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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

sql statement with a where clause causing an error

can someone please correct the below for me.

thanks

ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\samuel.brierley\Desktop\External Projects\NRA\AFMS.accdb];
SQL SELECT *
FROM `dbo_bak_fms_equipment WHERE (((dbo_bak_fms_equipment.Contract_Id)='2'))';

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Hello Samuel,

Can you post the exact error you are getting. And why there is a apostrophe after the FROM clause just wondering to know. The field name you have used Contract_Id is that a Numeric field or a text?

Try and let us know

SQL SELECT *

FROM dbo_bak_fms_equipment WHERE dbo_bak_fms_equipment.Contract_Id = 2;

V.

View solution in original post

5 Replies
alex_millan
Creator III
Creator III

Hi,


try:


WHERE dbo_bak_fms_equipment.Contract_Id='2';


Regards

er_mohit
Master II
Master II

Try this

SQL SELECT *
FROM `dbo_bak_fms_equipment` WHERE dbo_bak_fms_equipment.Contract_Id='2';

vishsaggi
Champion III
Champion III

Hello Samuel,

Can you post the exact error you are getting. And why there is a apostrophe after the FROM clause just wondering to know. The field name you have used Contract_Id is that a Numeric field or a text?

Try and let us know

SQL SELECT *

FROM dbo_bak_fms_equipment WHERE dbo_bak_fms_equipment.Contract_Id = 2;

V.

samuel_brierley
Creator
Creator
Author

Thanks,

the reason there was an apostophe is because when i select the table using the qlikview tool the below is what is generated.

SQL SELECT *

FROM `dbo_bak_fms_equipment`;

i figured therefore that was some slight tweak to the syntax QlikView requires.

buzzy996
Master II
Master II

simply u can pass like this with single quotes.

WHERE dbo_bak_fms_equipment.Contract_Id='2';