Home » SQL & PL/SQL » SQL & PL/SQL » problem to show result in join tables
problem to show result in join tables [message #678087] Sat, 09 November 2019 10:23 Go to previous message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member
my tables is
CREATE TABLE TB1(TR_NO NUMBER, TR_DATE DATE);
CREATE TABLE TB2(ID NUMBER,TR_NO NUMBER,TOTAL NUMBER);

tb1 master table
tb2 details table

Insert into HR.TB2
   (ID, TR_NO, TOTAL, NOTE)
 Values
   (1, 1, 50, 'NOTE1');
Insert into HR.TB2
   (ID, TR_NO, TOTAL, NOTE)
 Values
   (2, 1, 50, 'NOTE2');
Insert into HR.TB2
   (ID, TR_NO, TOTAL, NOTE)
 Values
   (6, 2, 60, 'NOTES4');
Insert into HR.TB2
   (ID, TR_NO, TOTAL, NOTE)
 Values
   (5, 1, 60, 'NOTE3');
Insert into HR.TB2
   (ID, TR_NO, TOTAL, NOTE)
 Values
   (4, 2, 60, 'NOTE5');

i want show result like this 
    
    tr_no   total   note
    1       0       note1
    1       0       note2
    1       50      note3
    2       0       note4
    2       60      note5
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ajuda com procedure Type Pipilined
Next Topic: who called my procedure through a database link
Goto Forum:
  


Current Time: Wed Feb 19 17:58:18 CST 2020