Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 SQL using LIKE with many options

Author  Topic 

leandroengel
Starting Member

3 Posts

Posted - 2004-12-09 : 15:32:08
Hi everyone,

How can I use the LIKE with many options to do a SELECT?

For example:

SELECT * FROM CLIENT
WHERE NAME_CLIENTE LIKE ('joh%', 'carl%', 'j%')

I now that I could do as below, but I want use only 1 time the LIKE:

SELECT * FROM CLIENT
WHERE
NAME_CLIENTE LIKE ('joh%') OR
NAME_CLIENTE LIKE ('carl%') OR
NAME_CLIENTE LIKE ('j%') OR


Thanks a lot.

Leandro

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-09 : 15:51:26
Please do not cross post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=43543
Go to Top of Page
   

- Advertisement -