IDS MDM IT Veg
This commit is contained in:
@@ -3418,17 +3418,11 @@ Module Mail
|
||||
' --- SQL 1x laden: alle Monate / Datenquellen ---
|
||||
Dim sqlstr As String =
|
||||
"SELECT * FROM (
|
||||
SELECT
|
||||
COUNT(*) AS Anzahl,
|
||||
'IDS' AS Datenquelle,
|
||||
MONTH(t.YearMonthDay) AS [Month],
|
||||
YEAR(t.YearMonthDay) AS [Year]
|
||||
FROM tblIDSTransactionsNew t
|
||||
INNER JOIN tbl_IDS_Länder l ON t.OutletCountryCode = l.OutletCountryCode
|
||||
INNER JOIN tbl_IDS_Produkte p ON t.ProductTypeCode = p.ProductTypeCode
|
||||
WHERE YEAR(t.YearMonthDay) = " & yearVal & "
|
||||
GROUP BY MONTH(t.YearMonthDay), YEAR(t.YearMonthDay)
|
||||
|
||||
SELECT count(*) as Anzahl, 'IDS' as Datenquelle, Month(tblIDSTransactionsNew_details.YearMonthDay) as Month,Year(tblIDSTransactionsNew_details.YearMonthDay) as Year
|
||||
FROM tblIDSTransactionsNew_details
|
||||
WHERE Year(tblIDSTransactionsNew_details.YearMonthDay) = " & yearVal & "
|
||||
GROUP BY Month(tblIDSTransactionsNew_details.YearMonthDay),Year(tblIDSTransactionsNew_details.YearMonthDay)
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
@@ -3437,7 +3431,7 @@ Module Mail
|
||||
MONTH([Transaction date]) AS [Month],
|
||||
YEAR([Transaction date]) AS [Year]
|
||||
FROM [VERAG].[dbo].[tblMautbericht]
|
||||
WHERE YEAR([Transaction date]) = " & yearVal & "
|
||||
WHERE YEAR([Transaction date]) = " & yearVal & " and Datenquelle not in ('IDS')
|
||||
GROUP BY Datenquelle, MONTH([Transaction date]), YEAR([Transaction date])
|
||||
) AS temp
|
||||
ORDER BY Datenquelle, temp.[Year], temp.[Month];"
|
||||
|
||||
Reference in New Issue
Block a user