Re: SELECT and regular expression



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@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:26bee$444cf727$c1263429$26427@xxxxxxxxxxxx

"Tony Rogerson" <tonyrogerson@xxxxxxxxxxxxxxxx> wrote in message
news:e2isig$2qt$1$8300dec7@xxxxxxxxxxxxxxxxxxx
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




.



Relevant Pages

  • Re: OE 6 wont switch identities
    ... > account. ... > identities in OE6, these being Martin, Chris and Andy. ... > identities to the Martin account, OE refreshes, but still with the Chris ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Network Access Problem
    ... "CHAMILA" wrote in message ... > Okay Martin, It appears to me problem with your account. ... >> connected together through a hub and the hub also connect to it's DSL modem, ...
    (microsoft.public.windowsxp.network_web)
  • Re: Messenger
    ... below "you" doesn't refer to Martin in particular. ... What will happen is that you (or someone that has your address in their MSN / Hotmail / whatever) will receive an invite from someone you know to view their pics, ... A naive user then enters their MSN / Hotmail / whatever password and the site then logs into *your* account and scrapes all the addresses and sends off a new round of invites to all the people they find in *your* address book apparently from you and so on. ... If someone falls for this and the harvester decides their are no more address + passwords to be gleaned getting locked out of their account through a malicious password change is a possibility. ...
    (uk.rec.humour)
  • RE: Network Access Problem
    ... Okay Martin, It appears to me problem with your account. ... TO SUCCESSFULLY WORK SHARE FOLDERS AND FILES, ... > connected together through a hub and the hub also connect to it's DSL modem, ...
    (microsoft.public.windowsxp.network_web)
  • RE: Launching Common Files after Migration - Policy Issue??
    ... workstation "User" account per workstation that all users ... Of course the admin account is fine. ... >Hello Martin, ... >apps but some app that requires the user to have ...
    (microsoft.public.win2000.security)