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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Multi-character wildcards

Author  Topic 

Selector
Starting Member

3 Posts

Posted - 2001-03-16 : 11:46:34

To abstract the problem, I think what I'm trying to do hinges on explicit operators. For example, when you use the:

LIKE '[ABC]DEF'

format, you will get ADEF, BDEF and CDEF returned. SQL Server implicitly knows that each character in the square brackets is logically seperated by an OR operator. Using a vertical pipe as an OR, you could interpret the above as:

LIKE '[A|B|C]DEF'

So what I want to do is the following:

LIKE '[DOG|CAT]'

To return DOG FOOD and CAT FOOD. If SQL Server allowed you to explicitly declare an OR seperator, my worries would be over!!!

Any ideas?

Thanks everyone


   

- Advertisement -