Gossamer Forum
Home : General : Databases and SQL :

select like wildcards?

Quote Reply
select like wildcards?
I'm putting together a SELECT LIKE string, I understand that I can use % for one or more chrs or _ for any single chr...

Are there any other wildcards like:
digits
single digit
words
single word
not digits
not words etc...?

edit:
Also is there a NOTLIKE function?


moog
-- I've spent most of my money on beer and women... the rest I just wasted.

Last edited by:

moog: Jul 22, 2004, 10:42 AM
Quote Reply
Re: [moog] select like wildcards? In reply to
support varies so you'd need to be more specific on dialect (MySQL, etc.). For example, there is an RELIKE function that lets you use regular expressions, but I don't think it was for MySQL. As for negative LIKE's, you would simply use "NOT LIKE"

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] select like wildcards? In reply to
I think he was more asking if stuff like the MySQL equivelant of stuff like;

$var !~ /\d+/

...i.e contains at least one digit.

I'd be interested in this too.... I've never managed to work it out myself :/

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] select like wildcards? In reply to
http://dev.mysql.com/...mysql/en/Regexp.html

Bob
http://totallyfreeads.com.au
Quote Reply
Re: [lanerj] select like wildcards? In reply to
Thank's guys... Andy for clarifying my query and landerj for the link to the page I'd previously spent two hours searching for!...


moog
-- I've spent most of my money on beer and women... the rest I just wasted.