I'n my sql 2012 im generating a series of current month date like below in grid
; WITH dates(Date) AS
(
SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) as Date
UNION ALL
SELECT DATEADD(d,1,[Date])
FROM dates
WHERE DATE < DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE()-1), -1)
)
Select * from ( select convert(varchar(max),DATE,105) as [AttDate] from master_table) as tt
once i insert a date in sample table i dont want to generate that date in grid how can i achieve that task