Re: SQL-- Please help me :)

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Mon, 25 Jan 2010 18:15:49 +0100
Message-ID: <4b5dd1c3$0$21174$426a74cc_at_news.free.fr>


"JIACHENG SUN" <sunjcb_at_googlemail.com> a écrit dans le message de news: 538246a1-9c3c-4c6f-aa3a-1bf7f2ea55d4_at_p24g2000yqm.googlegroups.com...
| table 1
| ref code
| 1 code_1
| 1 code_2
| 2 code_3
| 2 code_5
| .......
| .......
|
| table 2
| code code_description value
| code_1 description1 3.4
| code_2 description2 3.5
| code_3 description3 0
| code_4 description4 0
| code_5 description5 0
|
| how to write a sql to get the result below:
|
| ref code description value
| 1 code_1 description1 3.4
| 1 code_2 description2 3.5
| 1 code_3 description3 0
| 1 code_4 description4 0
| 1 code_5 description5 0
| 2 code_1 description1 3.4
| 2 code_2 description2 3.5
| 2 code_3 description3 0
| 2 code_4 description4 0
| 2 code_5 description5 0
| ...........
| ............
|
| I tried to use outer join and nvl function, but still couldn't get the
| result i need. Cos if we have 1000 refs in table 1, it is impossible
| to use nvl. how do your guys think?
|
| thanks so much!!

It is useless to repost the same question in other Oracle forums, the same people answer to all of them.

So, once again:
Provide the statements for the simple example. Explain with WORDS the rule to get the result.

Regards
Michel Received on Mon Jan 25 2010 - 11:15:49 CST

Original text of this message