Hi there,
The script below displays the attached output but as shown, it skips certain days and i need to include these to calculate my avg balance for a certain month, i.e.Nov. How do i update the script to include for example between 01 Nov and 05 Nov, there was no entries, therefore my balance should remain the same & display my missing dates 02,03,04 Nov??
DECLARE
@STARTDATE DATETIME,
@ENDDATE DATETIME
SET @STARTDATE = '2009-11-01'
SET @ENDDATE = '2009-11-30'
SELECT ACBH.ACCOUNTNO,
CONVERT (VARCHAR,ACBH.I NSTRTDTE,106) AS INSTRTDTE,
ACBH.ORIGBALANC E,
ACCT.CCY
FROM ACBH,ACCT
WHERE ACBH.ACCOUNTNO = '31400000782'
AND ACBH.ACCOUNTNO = ACCT.ACCOUNTNO
AND ACBH.INSTRTDTE BETWEEN @STARTDATE AND @ENDDATE
Thanks in advance for assistance. . .
The script below displays the attached output but as shown, it skips certain days and i need to include these to calculate my avg balance for a certain month, i.e.Nov. How do i update the script to include for example between 01 Nov and 05 Nov, there was no entries, therefore my balance should remain the same & display my missing dates 02,03,04 Nov??
DECLARE
@STARTDATE DATETIME,
@ENDDATE DATETIME
SET @STARTDATE = '2009-11-01'
SET @ENDDATE = '2009-11-30'
SELECT ACBH.ACCOUNTNO,
CONVERT (VARCHAR,ACBH.I NSTRTDTE,106) AS INSTRTDTE,
ACBH.ORIGBALANC E,
ACCT.CCY
FROM ACBH,ACCT
WHERE ACBH.ACCOUNTNO = '31400000782'
AND ACBH.ACCOUNTNO = ACCT.ACCOUNTNO
AND ACBH.INSTRTDTE BETWEEN @STARTDATE AND @ENDDATE
Thanks in advance for assistance. . .
Comment