|
Posted by Tony Rogerson on 04/24/06 23:38
Hang on Martin, you didn't ask for that.
Whats your actual requirement?
You can use true regular expressions by using CLR function written in say C#
/ VB.NET.
LEFT( account, 1 ) IN ( .... )
The LIKE is more performant because it can better use an index.
--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Martin Lukasik" <marcin@milea.pl.i.hate.this.spam> wrote in message
news:26bee$444cf727$c1263429$26427@ZOO.CO.UK...
>
> "Tony Rogerson" <tonyrogerson@sqlserverfaq.com> wrote in message
> news:e2isig$2qt$1$8300dec7@news.demon.co.uk...
>> where ( account like 'EB%
>> or account like 'NB%' )
>> and ( account like 'E0%
>> or account like 'N0%' )
>> and len( account ) between 6 and 7
>
> Thank you,
>
> Is there any easier way?
> What if first characters are A, D, C, 4, X, Z, Y? It's not really nice to
> type every permutation.
> There must be some regular expression...
>
> Martin
>
>
Navigation:
[Reply to this message]
|