Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql syntax error 2

Status
Not open for further replies.

ringadeal

Technical User
Jan 16, 2008
67
US
What is wrong with my syntax that is bringing the following error message?:

Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC Microsoft Access Driver] Syntax error in string in query expression '(productid_img = 197 OR ProductFam=1) OR subfam=10 AND (ColoursAtt1 <> ") ORDER BY sort_img_prd DESC'.
 
Replace this:
[tt]"[/tt]
with this:
[tt]''[/tt]

Furthermore, I'd suggest you to carefully use parentheses when mixing OR & AND operators

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
ringadeal ,

Did PHV's suggestion fix your problem? Please update with your situation.

--

"If to err is human, then I must be some kind of human!" -Me
 
thanks for your concern. Yes, this was the solution!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top