Compare commits
4 Commits
0581aba919
...
301a7bff2a
| Author | SHA1 | Date | |
|---|---|---|---|
| 301a7bff2a | |||
| 7431a845ce | |||
| bfd18b5154 | |||
| 04d9e8f45b |
@@ -3418,27 +3418,21 @@ 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
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*) AS Anzahl,
|
COUNT(*) AS Anzahl,
|
||||||
Datenquelle,
|
Datenquelle,
|
||||||
MONTH([Transaction date]) AS [Month],
|
MONTH(Billingdate) AS [Month],
|
||||||
YEAR([Transaction date]) AS [Year]
|
YEAR(Billingdate) AS [Year]
|
||||||
FROM [VERAG].[dbo].[tblMautbericht]
|
FROM [VERAG].[dbo].[tblMautbericht]
|
||||||
WHERE YEAR([Transaction date]) = " & yearVal & "
|
WHERE YEAR(Billingdate) = " & yearVal & " and Datenquelle not in ('IDS')
|
||||||
GROUP BY Datenquelle, MONTH([Transaction date]), YEAR([Transaction date])
|
GROUP BY Datenquelle, MONTH(Billingdate), YEAR(Billingdate)
|
||||||
) AS temp
|
) AS temp
|
||||||
ORDER BY Datenquelle, temp.[Year], temp.[Month];"
|
ORDER BY Datenquelle, temp.[Year], temp.[Month];"
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user