Between "AA-*" And "ZZ-*"

Regex is the ultimate matcher though. It is incredibly versatile and can do things way beyond that simple match ... if you can get your head around the match syntax.

It is definitely something all developers should be aware of.
 
The correct pattern using the LIKE operator would be (assuming I've understood the problem):

Like "[a-z][a-z][-]*"

So the first two characters must be letters and the third character must be a hyphen. Thereafter can be any characters.

Help on LIKE patterns is available here

hth
Chris
 
The correct pattern using the LIKE operator would be (assuming I've understood the problem):

Like "[a-z][a-z][-]*"

The original question is a bit ambiguous and I may have misunderstood. I thought both letters were supposed to be the same. Otherwise the problem would be trivial as Chris shows.

My Regex demands both letters are the same.

That is why clear examples should be given.
 
Oh darn! Talk about looking but not seeing.

Since when have we ever used a wild card with a BETWEEN statement? :banghead:

...
Because wildcard characters, such as *, are treated as literals, you cannot use them with the Between...And operator. For example, you cannot use 980* and 989* to find all postal codes that start with 980 to 989.
...
 
Last edited:

Users who are viewing this thread

Back
Top Bottom