sean peters <[EMAIL PROTECTED]> wrote:
> Hi all, I am wondering if there is a way to transform the following query
> using LIKE & OR into a query using IN, where the IN ( list) contains wildcard
> expressions.
>
> initial query:
> SELECT ID FROM address WHERE Street_Name LIKE "first%" OR Street_Name LIKE
> "second%"
>
> desired format would be something along the lines of:
> SELECT ID FROM address WHERE Street_Name IN ("first%", "second%")
>
> As written, the second query always returns 0 rows, so the wildcards are NOT
> being used. (the first query returns many results)
>
> I dont think this is possible, i've tried many syntax variations.
No, you can't use wildcards in the IN() function.
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Egor Egorov
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]