Re: IN Lists

From: ddf <oratune_at_msn.com>
Date: Tue, 17 Feb 2009 12:30:02 -0800 (PST)
Message-ID: <07f78a48-b7bd-4113-9eb5-2b620284e86a_at_k9g2000vbl.googlegroups.com>



On Feb 17, 2:10 pm, Mtek <m..._at_mtekusa.com> wrote:
> On Feb 17, 2:05 pm, ddf <orat..._at_msn.com> wrote:
>
>
>
>
>
> > On Feb 17, 1:47 pm, Mtek <m..._at_mtekusa.com> wrote:
>
> > > Sheesh, how hard can this be:
>
> > >      IF p_code IN v_code_list THEN
> > >         v_query := v_query || ' AND p_code IN v_code_list';
> > >      END IF;
>
> > > Does not like that.  The IN list will be dynamic.......
>
> > > Oracle is being picky here......
>
> > You might want to read here:
>
> >http://oratips-ddf.blogspot.com/2008/09/how-dynamic.html
>
> > David Fitzjarrell
>
> Crap that is a lot of work to do this simple task....- Hide quoted text -
>
> - Show quoted text -

That's why it's called 'work'. As I said in the blog entry:

"The problem, though simple to state, isn't quite as simple to solve, as proven above. That's because Oracle is a database, it isn't your brain, so it can't draw on prior experience and know that '10,20,30' is glorified shorthand for 10,20,30. And because it's software (really, it is) running on a computer, it does what you tell it to do, whether or not those instructions provide the output you'd intended. Since it can't think like you do you'll have to start 'thinking' like it does, and that may throw a wrench into your logical picture of the situation. Knowing what to do with that wrench is half of the battle."

You've been provided the tools to get this task done. Unless you're willing to pay for a consultant to come in and do this for you it's now up to you to use those tools. Remember that we are here to help, and we will.

David Fitzjarrell Received on Tue Feb 17 2009 - 14:30:02 CST

Original text of this message