I have a list of dates for example,
I want to create a temp table and select only those dates that are end of month for each year. I could have used
select DATEADD(DAY,-1, '3/1/2003')) but this would have returned me 2/28/2003 but I need to get 2/27/2003
How can i do this in sql. Can i use loop in sql?