Back to the month index |
Back to the list index
|
Jeff Ramacher (jeffr@maui.com)
Thu, 19 Sep 1996 08:56:31 -1000
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Glenn Cooper: "Re: [mSQL] Error in creating Database"
- Previous message: Robert Betts: "Re: [mSQL] [w3-mSQL] Search for a substring"
- In reply to: Roberto Cota Rivas: "[mSQL] [w3-mSQL] Search for a substring"
- Next in thread: Kenneth.Holmlund@tp.umu.se: "Re: [mSQL] [w3-mSQL] Search for a substring"
Date: Thu, 19 Sep 1996 08:56:31 -1000 Message-Id: <199609191856.IAA02447@mrtc.org> From: jeffr@maui.com (Jeff Ramacher) Subject: Re: [mSQL] [w3-mSQL] Search for a substring>
>I am running version 1.0 of w3-msql on an AIX machine...
>I need to find a substring within a string, for example 'Avenue'
>where all the records with an address string containing 'Avenue' will be
>returned.
>
That's easy. Just use the LIKE clause of the SELECT statement.
For example,
SELECT street FROM mytable WHERE street LIKE '%Avenue%'
To get that without a concern for case-sensitivity, try:
SELECT street FROM mytable WHERE street LIKE '%[Aa][Vv][Ee][Nn][Uu][Ee]%'
The percent sign matches any number of characters. See the docs for more info.
Now the tricky part is matching 'Avenue' only when it appears as a normal
word, e.g. surrounded by either whitespaces or special characters
!@#$%^&*()-=+, and *not* if it's *part* of another word, e.g.
'Avenuesomethingorother'. Any help is appreciated.
Jeff R.
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Glenn Cooper: "Re: [mSQL] Error in creating Database"
- Previous message: Robert Betts: "Re: [mSQL] [w3-mSQL] Search for a substring"
- In reply to: Roberto Cota Rivas: "[mSQL] [w3-mSQL] Search for a substring"
- Next in thread: Kenneth.Holmlund@tp.umu.se: "Re: [mSQL] [w3-mSQL] Search for a substring"