-----Original Message-----
From:	Matt Watson [mailto:loren@purdue.edu]
Sent:	Friday, August 14, 1998 4:30 PM
To:	akaplan@interaccess.com
Subject:	access database SQL question

I'm trying to use the like command in a query to distinguish between
variables where the only difference is an * at the beginning.  Normally
this wouldn't be a problem but in Access the * is the wildcard.  I
assume there is some kind of sytax, such as backslashes or underscores
that will make * actually mean * instead of wildcard when using 'like'.
Would you happen to know how to achieve this?

Thanks,
Matt Watson
PC Network Support Tech.
Wellman Thermal Systems, Corp.


---- Reply -----------------
In SQL*Plus, you need to set the Escape value. It can be whatever you want. Look at the following example:

SQL> SET ESCAPE ^

SQL> SELECT '^%' FROM DUAL;

%

1 row selected.

SQL> SELECT * FROM TABLE_A WHERE COLUMN_A LIKE '^*HELLO';

*HELLO

1 row selected

SQL>

Best of luck,

-Ari Kaplan
www.arikaplan.com                       

Back to Ari Kaplan's Home Page "> Back to Ari Kaplan's Home Page