ODBC Queries, Escaping text/reserved keywords
Posted: 20 Feb 2007, 12:09
Hi all,
I have a query to list all the delivery addresses for a selected client, in short
This works fine for all clients bar one whose code is MAX, which gives me a "Syntax error: Invalid filter in where clause". This seems to be because MAX is an aggregate function/reserved keyword (and testing others seems to confirm this).
Is there any way to force the ODBC driver to see this as just another string instead of a keyword ?
(I've tried apostrophes, inverted commas etc, and using LIKE instead of = )
Cheers,
Steve.
I have a query to list all the delivery addresses for a selected client, in short
Code: Select all
SELECT ACCOUNT_REF, DESCRIPTION, NAME, ADDRESS_1,ADDRESS_2, ADDRESS_3, ADDRESS_4, ADDRESS_5, TELEPHONE, FAX, E_MAIL
FROM SALES_DEL_ADDR
WHERE (ACCOUNT_REF = 'xxx')
Is there any way to force the ODBC driver to see this as just another string instead of a keyword ?
(I've tried apostrophes, inverted commas etc, and using LIKE instead of = )
Cheers,
Steve.