Subject Re: [firebird-support] Using % works for LIKE and not for IN ()
Author Mark Rotteveel
On 16-2-2013 15:52, venussoftop wrote:
> Hi all
>
> When using LIKE I can use the 'String%' to look for partial matches. Not so when I want to use IN ('String%', 'VariousString%') instead I have to use 2 LIKEs
>
> Is there something I missed for using IN ()? That would allow me to use partial matches? The IN keeps the query simpler and shorter than multiple LIKEs IMO.

You didn't miss anything. You need to see item IN (itemlist) to mean
"does itemlist contain a value equal to item": it does not support
partial matches! You either need to use multiple LIKE or STARTING WITH
statements, or use the regular expressions introduced in 2.5 with
SIMILAR TO, although multiple LIKEs are probably more efficient.

Mark
--
Mark Rotteveel