You are here: Re: SELECT and regular expression « MsSQL Server « IT news, forums, messages
Re: SELECT and regular expression

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация