I created a chart that will plot data to show value for present data on specific date
with this SQL
select substring(TRAN_DATE, 1, 4) MONTH, substring(TRAN_DATE, 5, 2) DATE, count(*) AMOUNT from TA1606 group by TRAN_DATE
this is field structure
TRAN_DATE char(6)
with this create command
CREATE TABLE [dbo].[TA16](
[TRAN_DATE] [char](6) NULL,
[TERM] [char](16) NULL,
)
this my result is
MONTH DATE AMOUNT
1606 03 44
but this is just only one row and one day
i need to get all day of month in example is 06
June
it will query all day in the month then mapping data to date
as my result above shown
this is my expected result
MONTH DATE AMOUNT
1606 1 0
1606 2 0
1606 3 44
1606 4 0
1606 5 0
1606 6 0
1606 7 0
1606 8 0
1606 9 0
1606 10 0
1606 11 0
1606 12 0
1606 13 0
1606 14 0
1606 15 0
1606 16 0
1606 17 0
1606 18 0
1606 19 0
1606 20 0
1606 21 0
1606 22 0
1606 23 0
1606 24 0
1606 25 0
1606 26 0
1606 27 0
1606 28 0
1606 29 0
1606 30 0