IDS MDM IT Veg
This commit is contained in:
@@ -3418,16 +3418,10 @@ Module Mail
|
|||||||
' --- SQL 1x laden: alle Monate / Datenquellen ---
|
' --- SQL 1x laden: alle Monate / Datenquellen ---
|
||||||
Dim sqlstr As String =
|
Dim sqlstr As String =
|
||||||
"SELECT * FROM (
|
"SELECT * FROM (
|
||||||
SELECT
|
SELECT count(*) as Anzahl, 'IDS' as Datenquelle, Month(tblIDSTransactionsNew_details.YearMonthDay) as Month,Year(tblIDSTransactionsNew_details.YearMonthDay) as Year
|
||||||
COUNT(*) AS Anzahl,
|
FROM tblIDSTransactionsNew_details
|
||||||
'IDS' AS Datenquelle,
|
WHERE Year(tblIDSTransactionsNew_details.YearMonthDay) = " & yearVal & "
|
||||||
MONTH(t.YearMonthDay) AS [Month],
|
GROUP BY Month(tblIDSTransactionsNew_details.YearMonthDay),Year(tblIDSTransactionsNew_details.YearMonthDay)
|
||||||
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)
|
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
@@ -3437,7 +3431,7 @@ Module Mail
|
|||||||
MONTH([Transaction date]) AS [Month],
|
MONTH([Transaction date]) AS [Month],
|
||||||
YEAR([Transaction date]) AS [Year]
|
YEAR([Transaction date]) AS [Year]
|
||||||
FROM [VERAG].[dbo].[tblMautbericht]
|
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])
|
GROUP BY Datenquelle, MONTH([Transaction date]), YEAR([Transaction date])
|
||||||
) AS temp
|
) AS temp
|
||||||
ORDER BY Datenquelle, temp.[Year], temp.[Month];"
|
ORDER BY Datenquelle, temp.[Year], temp.[Month];"
|
||||||
|
|||||||
Reference in New Issue
Block a user