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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT

Status
Not open for further replies.

rlals

Programmer
Joined
Jun 23, 2003
Messages
29

Is there a easy way to write something like:

SELECT * FROM CLIENT WHERE STATUS='A' OR STATUS='L' OR STATUS='F'

I would like something like STATUS in 'ALF', but it doesn't work

Can someone help me?

Thanks

Ricardo
 
depends on the database you're using for the LIKE syntax, but something like
Code:
SELECT * FROM CLIENT WHERE STATUS LIKE '%ALF%';
for MySQL database and i'm pretty sure like
Code:
SELECT * FROM CLIENT WHERE STATUS LIKE '*ALF*';
for Access database.

 
SELECT * FROM CLIENT WHERE STATUS in ('A','L','F',........)

I think this might help.
 

Thanks guys.

Ricardo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top