Hi Guys,
I created this select query. SELECT GeneralLedger, YEAR(ReportingDate) AS jaar, MONTH(ReportingDate) AS periode, SUM(AmountDCDebit - AmountDCCredit) AS Saldo
FROM dbo.GeneralLedgerBalances
GROUP BY GeneralLedger, YEAR(ReportingDate), MONTH(ReportingDate)
HAVING (YEAR(ReportingDate) = 2020)
SQL
SELECTGeneralLedger,YEAR(ReportingDate)ASjaar,MONTH(ReportingDate)ASperiode,SUM(AmountDCDebit-AmountDCCredit)ASSaldoFROMdbo.GeneralLedgerBalancesGROUPBYGeneralLedger,YEAR(ReportingDate),MONTH(ReportingDate)HAVING(YEAR(ReportingDate)=2020)
The result is this: see attachement "result"
I would like to change my selectquery so the result would end like this: "result mus be"
SQL