Re: Sensitive SQL Question
Posted in 1995
cat@tecsys.com (Catalin Badea) writes:
> : Is there any way to turn of case sensitivity for a simple query e.g.
>
> : select * from clients where cliname matches "PHUCKIT*"
>
> Yes, there is a way.
>
> select * from clients where cliname matches "[Ss][Mm][Ii][Tt][Hh]*">
> It will match "Smith" "SMITH" "sMiTh" etc...
>
Note: To match any name BUT the smiths (aka smith, SMITH, Smith) can't be
done via the screen construct.
What you might think would work: "[^Ss][^Mm][^Ii][^Tt][^Hh]*"
But that throws away any record that starts with S or s
AND ALSO throws away any record whose second character is M or m.
AND ALSO ..., etc.
--
Colin McGrath Internet: cmm@trac3000.ueci.com
Raytheon Engineers & Constructors Inc. UUCP: ..!uunet!trac2000!trac3000!cmm
30 S. 17th St Voice: 215-422-4144
Philadelphia, PA, 19101 FAX: 215-422-1445
<Standard disclaimers apply>