J
Joe Stanton
Hello Group
I have a query that works in Oracle and SQL Server, but fails in Microsoft
Access.
The query is:
SELECT data fromTABLE1 WHERE data>='A&' AND data<'A'''
Here is my sample data:
TABLE1.DATA
Row1 A&M Stores
Row2 A&P Grocery
Row3 Assoc. Foods
Under Oracle and SQL Server the rows that are returned are Rows 1 and 2.
Under Access no rows are returned.
The goal is to write a SQL statement that works on all 3 platforms without
creating a customized query for each platform (or actually custom just for
Access). Please note that I know how to write a query that would work in
Access, but that query would use the InStr function which is not universally
available.
It is my theory that when Access (or Jet) executes the query it internally
executes the query as a LIKE type expression, and seeing that there are
special characters in the literal string this causes the query to return no
rows.
Thank you!
Joe
PS: Anyone emailing me responses are appreciated
I have a query that works in Oracle and SQL Server, but fails in Microsoft
Access.
The query is:
SELECT data fromTABLE1 WHERE data>='A&' AND data<'A'''
Here is my sample data:
TABLE1.DATA
Row1 A&M Stores
Row2 A&P Grocery
Row3 Assoc. Foods
Under Oracle and SQL Server the rows that are returned are Rows 1 and 2.
Under Access no rows are returned.
The goal is to write a SQL statement that works on all 3 platforms without
creating a customized query for each platform (or actually custom just for
Access). Please note that I know how to write a query that would work in
Access, but that query would use the InStr function which is not universally
available.
It is my theory that when Access (or Jet) executes the query it internally
executes the query as a LIKE type expression, and seeing that there are
special characters in the literal string this causes the query to return no
rows.
Thank you!
Joe
PS: Anyone emailing me responses are appreciated