Re: SELECT in problem

From: Carlos <miotromailcarlos_at_netscape.net>
Date: Wed, 3 Mar 2010 06:13:52 -0800 (PST)
Message-ID: <ede85022-d9a6-4f1e-81c5-724fedb1eb68_at_q23g2000yqd.googlegroups.com>



On Mar 3, 2:45 pm, Pedro <pedro.p..._at_gmail.com> wrote:
> Good morning people. I need quiet an odd help in here. Let me see if I
> can explain it.
>
> I have an SELECT WHERE IN (<list of ids>).
> Let us say that I sent the following list of ids: 1, 2 and 3.
>
> There is only resulting records for the ID = 3, but I'd like to see
> all the ids, even if they don't have records...
> I expect the following result for instance:
>
> ID     DESC
> 1
> 2
> 3      Test
>
> Any suggestion on how to do this? I have here the complete statement,
> but I don't think it would help for now...

OUTER JOIN with a table 'ad-hoc' for the desired values (possibly with a 'WITH' sentence)

HTH. Cheers.

Carlos. Received on Wed Mar 03 2010 - 08:13:52 CST

Original text of this message