I have got some problem with my sql query in oracle 9i.
i m trying to stop several occurances of same Do_No.
In the following example (Example1)shows that each Do_No have different MR_No and different MR_Amount.The problem is, we can see that same DO_No occourars several times.But i want it once only when show report on screen(see Example2).
Exmple:1
Query:
select
v_do_sales6.do_ no,
v_mreceipt1.mr_ no,
v_mreceipt1.amo unt
from
v_do_sales6,v_m receipt1 where v_do_sales6.do_ date between '01-jun-09' and '30-jun-09' and
v_mreceipt1.DIS TRIBUTOR_CODE=v _do_sales6.dist ributor_code and
v_do_sales6.dis tributor_code=' S051'
Output:
Do_No MR_No MR_Amount
-----------------------------------------------------------
01 101 5000
01 102 4500
01 103 5600
01 104 6800
01 105 5005
02 106 7250
02 107 3060
02 108 8000
Exmple:2
Output
Do_No MR_No MR_Amount
-----------------------------------------------------------
01 101 5000
102 4500
103 5600
104 6800
105 5005
02 106 7250
107 3060
108 8000
Can anybody Please help me..... i need it early
Thanks in advance
i m trying to stop several occurances of same Do_No.
In the following example (Example1)shows that each Do_No have different MR_No and different MR_Amount.The problem is, we can see that same DO_No occourars several times.But i want it once only when show report on screen(see Example2).
Exmple:1
Query:
select
v_do_sales6.do_ no,
v_mreceipt1.mr_ no,
v_mreceipt1.amo unt
from
v_do_sales6,v_m receipt1 where v_do_sales6.do_ date between '01-jun-09' and '30-jun-09' and
v_mreceipt1.DIS TRIBUTOR_CODE=v _do_sales6.dist ributor_code and
v_do_sales6.dis tributor_code=' S051'
Output:
Do_No MR_No MR_Amount
-----------------------------------------------------------
01 101 5000
01 102 4500
01 103 5600
01 104 6800
01 105 5005
02 106 7250
02 107 3060
02 108 8000
Exmple:2
Output
Do_No MR_No MR_Amount
-----------------------------------------------------------
01 101 5000
102 4500
103 5600
104 6800
105 5005
02 106 7250
107 3060
108 8000
Can anybody Please help me..... i need it early
Thanks in advance
Comment