On 9/1/05, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> 
> LIKE doesn't support regular expressions. You'd have to do "cn LIKE
> 'a%' OR cn LIKE 'b%'...". However, definitely check your DB's
> documentation to see if there is a regular expression operator. MySQL
> has REGEX, for example, which is the same as LIKE, except that it
> understands regex instead of percent signs.



One crucial piece of information that would help is which database you're 
using. But assuming it's MS-SQL server, while Barney's right in principle 
(no regex with LIKE), MS-SQL *does* understand the syntax you're trying to 
use. Look for "Pattern Matching in Search Conditions" in the docs. And 
according to the docs, CFMX7 query of queries supports this syntax as well.

On 9/1/05, Les Mizzell <[EMAIL PROTECTED]> wrote:
> > Basically, I'm trying to pull up a number of names where the first
> > letter is in a RANGE being passed by an url variable.
> >
> > Something like:
> >
> > Select from myTABLE
> > Where ClientName Like '[a-d]%'


I'd actually try this query and see if it works -- the problem could be 
you're not passing the URL variable you think you are. If you're passing the 
string "a-d" then you probably want to URLEncodedFormat or at least verify 
it's coming through like you think it is.

And you may be using a database that doesn't support the syntax you're 
trying to use -- we still don't know which one it is :)

>
> > ...so, it would pull up all clients with names starting with a,b,c, or 
> d.
> >
> > But, this isn't working.
> >
> > Ideas?
> 


-- 
John Paul Ashenfelter
CTO/Transitionpoint
(blog) http://www.ashenfelter.com
(email) [EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217200
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to