Subject | [SPAM 4] [firebird-support] Re: Is such a CASE WHEN usage allowed? |
---|---|
Author | venussoftop |
Post date | 2012-04-12T11:13:53Z |
--- In firebird-support@yahoogroups.com, Kjell Rilbe <kjell.rilbe@...> wrote:
Thanks again
Kind regards
Bhavbhuti
>Thanks a lot Kjell for your suggestions here. I have just posted my final query in my reply to Svein please check it out and the reasons for that implementations.
> venussoftop skriver:
> >
> > Now I can I be able to do a IN against an integer iID? If not is there
> > any way to convert the comma separated string to comma separated
> > integer value?
> >
>
> With a stored proc, yes, as suggested by Mark, but as I wrote far down
> in my other post, you can do this:
>
> POSITION(sep || soughtval || sep in sep || searchedvaluelist || sep) > 0
>
> Adding sep before and after each string makes sure you don't get false
> hits, like '12' in '341256,234,567' where '12' appears inside '341256',
> but ',12,' doesn't.
>
> Performance will suck, though. No indexing can be used.
>
> Kjell
>
> --
> ------------------------------
> Kjell Rilbe
> DataDIA AB
> E-post: kjell.rilbe@...
> Telefon: 08-761 06 55
> Mobil: 0733-44 24 64
>
>
>
> [Non-text portions of this message have been removed]
>
Thanks again
Kind regards
Bhavbhuti