Re: Perfact matching query?
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 03 Nov 2005 23:08:42 +0100
On Thu, 3 Nov 2005 09:54:41 -0500, Rogers wrote:
>I want to search the value by specific match but I couldn't... can any one
>let me know..
>
>
>select object_name(id) from syscomments where text like '%PresetVal%'
>
>When I run the above query it gave me 100 stored procedure but when I go one
>of them then I see the text contains PresetValues but I only want to get all
>the stored procedure which specific match by PresetVal not PresetValues....
>any idea ?
>
>Thanks
>
Hi Rogers,
To search for "PresetVal" but not "PresetValu" (and therefor not
"PresetValues" either), use
SELECT object_name(id)
FROM syscomments
WHERE text LIKE '%PresetVal[^u]%'
OR text LIKE '%PresetVal'
The first finds PresetVal followed by any character other than u; the
second finds PresetVal at the end of the text.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- References:
- Perfact matching query?
- From: Rogers
- Perfact matching query?
- Prev by Date: Re: FLOAT
- Next by Date: RE: sql server database comparisom tool
- Previous by thread: Perfact matching query?
- Next by thread: sql server database comparisom tool
- Index(es):