Quite rightly sucks - it is not the place for a regex.



"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Mingo Hagen
To: CF-Talk
Sent: Wed Aug 02 21:56:24 2006
Subject: Re: sql question.

SQL Server sucks at regexps, you have some rudimentary tools at your 
disposal with the LIKE statement, but none that I could get to work, I 
have in the past found a regexp stored procedure but that's just dog slow...

This is the like statement I tried:
  SELECT * FROM listing
  WHERE dir LIKE <cfqueryparam cfsqltype="CF_SQL_VARCHAR" 
value="warranty\%[^\]">

It doesn't work because the % sign already matches to the end of the 
string... so sorry :(

Mingo.

Brian Dumbledore wrote:
> I am using MS-SQL, I couldn't get this to work..
>
> I tried, patindex,charindex, like combinations, none worked.
>
> I have directory paths in a table, given a starting path of a directory, I
want to get its first level elements.
>
> eg:
>
> table has
> warranty\a\1.jpg
> warranty\a
> warranty\a\2.jpg
> warranty\a22
> warranty\a-23
>
> I want to get warranty\a,warranty\a22,warranty\a-23
>
> I tried all combinations, it doesn't work (correctly). I actually get only
warranty\a, but don't get the other two (which makes me thing it is because
of the numbers in the string.. but doesn't make any sense). Please help
>
> Thanks for your time.
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248686
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to