![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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... |
#3
| |||
| |||
|
|
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... |
#4
| |||
| |||
|
|
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... |
#5
| |||
| |||
|
|
Uzytkownik "jefftyzzer" <jefftyz... (AT) sbcglobal (DOT) net> napisal w wiadomoscinews:07c710d1-5277-4e8f-971f-4d5dfb7764aa (AT) q21g2000yqm (DOT) googlegroups.com... On Mar 3, 5:45 am, Pedro <pedro.p... (AT) gmail (DOT) 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... Here's a little nicer version: WITH counter AS (SELECT level id FROM dual CONNECT BY level <=3) SELECT c.id, t.* * FROM counter c * LEFT OUTER JOIN table t ON c.id = t.id |
![]() |
| Thread Tools | |
| Display Modes | |
| |