ane coba bantu, please reply kalo asyik...
select a,max(b),max(c),max(d),max(e) from ( select a,b,c,'-' d,'-' e  from 
table_1 union select a,'-' b,'-' c,d,e from table_2) group by a


--- On Mon, 4/19/10, I Nyoman Sukaryawan <[email protected]> wrote:

From: I Nyoman Sukaryawan <[email protected]>
Subject: Re: [indo-oracle] newbie tanya query..
To: [email protected]
Date: Monday, April 19, 2010, 9:30 AM







 



  


    
      
      
      create table x1(a char(1),b char(1) , c char(1));



create table x2(a char(1),d char(1) , e char(1));



insert into x1 values('1',' X','Y');



insert into x1 values('2',' T','U');



insert into x2 values('1',' Q','W');



insert into x2 values('3',' P','R');



select distinct

nvl(a,'-') a,

nvl(b,'-') b,

nvl(c,'-') c,

nvl(d,'-') d,

nvl(e,'-') e

from

(select x1.a,x1.b,x1. c,x2.d,x2. e from x1 left join x2 on x1.a =x2.A

union all

select x2.a,x1.b,x1. c,x2.d,x2. e from x2 left join x1 on x1.a =x2.A) ;



On 4/16/10, sefrinaldi <aldyoz...@gmail. com> wrote:

> pagi,

> mau tanya query donk, maklum masih cupu :D

> saya punya 2 tabel,

>

> tabel 1 :

>

> *| A | B | C |*

> | 1 | X | Y |

> | 2 | T | U |

>

> tabel 2 :

>

> *| A | D | E |*

> | 1 | Q | W |

> | 3 | P | R |

>

>

> nah saya pengen gabungin kedua tabel itu sehingga kolomnya menjadi  :

>

>

> *| A | B | C | D | E |*

> | 1 | X | Y | Q | W |

> | 2 | T | U | - | - |

> | 3 | - | - | P | R |

>

> jadi semua record field 'A' di tabel 1 dan table 2 di tampilin..

>

>

> mohon petunjuknya, .

>

>

> Salam,

>

> .aldi

>

>

> [Non-text portions of this message have been removed]

>

>



    
     

    
    


 



  






      

[Non-text portions of this message have been removed]

Kirim email ke