question

Bala avatar image
Bala asked

LIKE Condition with multiple values

Hi How can i retrieve information based on multiple wildcard conditions? For example, I need list of customers with names beginning either with A or CU or TO?

A little lost...

Thanks

likesearch
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Scot Hauder avatar image
Scot Hauder answered

I think Bala realized the answer after typing the end of the question: ...A or CU or TO

Name like 'A%' or Name like 'CU%' or Name like 'TO%' :)

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bala avatar image
Bala answered

never mind...Got it. i dont know why i asked this !!!

2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Post the answer so someone else reading it knows what you did.
5 Likes 5 ·
One of the main purposes of sites like this is knowledge sharing, and that is why you should post the answer even if you find it yourself
0 Likes 0 ·
zira avatar image
zira answered

In like condition you can use regular expression characters such as ^ and ~ along with usual %. It works with SQL 2005 and 2008. I am not sure about 2000.

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.