Databases Reference
In-Depth Information
SUM (rl.line_amount) Retourensumme
from [dbo].[iw_return_header]rh,[dbo].[iw_sales]s, [dbo].[iw_return_line]
rl,[dbo].[iw_article]a
where rh.orderNo = s.orderNo
and s.orderDate between '01.10.2011' and '31.12.2011'
and s.IWAN = rl.IWAN
and rh.returnNo = rl.returnNo
and rl.IWAN = a.IWAN
group by a.article_No +'_'+ a.colorCode ,
a.[description], a.colorDescription)ret, → Retourendaten
(SELECT a.article_No +'_'+ a.colorCode Style,
cr.Reason, COUNT (*) Angaben
FROM [dbo].[iw_return_header]rh,[dbo].[iw_sales]s,
[dbo].[iw_return_line]rl,
[dbo].[iw_codeReason]cr, [dbo].[iw_article]a
where rh.orderNo = s.orderNo
and s.orderDate between '01.10.2011' and '31.12.2011'
and s.IWAN = rl.IWAN
and rh.returnNo = rl.returnNo
and rl.returnReason = cr.Code
and rl.[Type] = 2
and cr.Type = 'returnReason'
and rl.IWAN = a.IWAN
group by a.article_No +'_'+ a.colorCode , cr.Reason)rr
Retourengründe
where ord.Style = ret.Style
and ord.Style = rr.Style
Bild 23.1 zeigt den Bericht, der schon ganz gut aussieht.
Bild 23 .1 ■ Retourentreiberbericht (Auszug)
Jetzt fehlt nur noch die Berechnung der Retourenquoten.
Search WWH ::




Custom Search