Skip to Content
0
Feb 05, 2015 at 06:59 AM

Porblem In Query

14 Views

Hi Experts

Select Distinct B.U_shade,A.U_IssueNO,B.Quantity,D.BatchNum,C.Quantity

FROM OIGE A INNER JOIN IGE1 B On A.DocEntry = B.DocEntry

INNER JOIN IBT1 C On C.BaseNum = A.DocNum AND C.ItemCode = B.ItemCode

INNER JOIN OIBT D ON D.BatchNum = C.BatchNum

WHERE A.U_IssueNO in ('50063','50064','50065') AND B.ItemCode like 'GF%%'

GROUP BY A.U_IssueNO,B.U_shade,B.Quantity,D.BatchNum,C.Quantity

order by A.U_IssueNO

this is my query and here is my output

S.no U_shade U_Issue No Quantity BatchNum Quantity 1 1 RED SMALL 50063 714 63959 714 2 1 RED SMALL 50063 714 63959 1040 3 1 RED BIG 50063 1040 63959 714 4 1 RED BIG 50063 1040 63959 1040 5 1 BLUE/WHITE SMALL 50064 729 63959 729 6 2 BLUE/WHITE BIG 50064 1040 63959 1040 7 2 BLUE/WHITE BIG 50064 1040 63959 729 8 1 BLUE/WHITE SMALL 50064 729 63959 1040 9 54NB-BLUE CHINA 50065 10306 59982 3164.4 10 54NB-BLUE CHINA 50065 10306 60574 7141.6

But I Need My Output Like this

S.no U_shade U_IssueNO Quantity BatchNum Quantity 1 1 RED SMALL 50063 714 63959 714 2 1 RED BIG 50063 1040 63959 1040 3 1 BLUE/WHITE SMALL 50064 729 63959 729 4 2 BLUE/WHITE BIG 50064 1040 63959 1040 5 54NB-BLUE CHINA 50065 10306 59982 3164.4 6 54NB-BLUE CHINA 50065 10306 60574 7141.6

Regards

Jenny