RE: [PHP-DB] Case-insensitive SELECT
| From: | Doug Semig | Date: | Wed, 16 Aug 2000 09:42:28 +0000 |
| Subject: | RE: [PHP-DB] Case-insensitive SELECT | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2084@lists.php.net to get a copy of this message | ||
There's nothing that I can find in SQL92 about LIKE being case insensitive.
Of course, I only have a copy of the draft standard and not the standard
itself. If you've got an extra copy of the standard itself, I'd love to
see it!
The draft of SQL92 actually goes into quite a lot of detail about the like
predicate and the collating sequence to use.
Perhaps you use MySQL or MS Access and figure that because that's how they
operate it must be because it's part of SQL92?
Doug
At 08:51 AM 8/16/00 +0100, Richard Allsebrook wrote:
>Like IS case insensitive (according to SQL92 anyway :-)
>
>How about:
>
>SELECT * FROM tbl WHERE fld LIKE 'Field Name'
>
>Will match:
>
>'Field Name', "Field name", "field name"
>
>but not "Field", "Field Value"
>
>so you will need
>
>SELECT * FROM tbl WHERE fld LIKE 'Field%' AND flg NOT LIKE 'Field Value'
>
>Hope this helps...
>
> _____
>
>~ Richard Allsebrook ~
>Applications Developer and Webmaster
>Easysoft Limited, No3 The Embankment, Leeds, LS1 4BJ
>http://www.easysoft.com
><http://www.easysoft.com> -
>http://www.cinema.com
><http://www.cinema.com>
>"A computer lets you make more mistakes faster than any invention in human
>history - with the possible exceptions of handguns and tequila."
>
> _____
>
>
>
>
>
>-----Original Message-----
... snipped ...