declare @date as int
declare @day as int
declare @month as int
set @date=14030101
set @day=1
set @month=1
create table #tblDate (
[dt] int,
[myDay] int
);
while (@month<=12)
begin
insert into #tblDate (dt, myDay) values (@date, @day)
set @day = @day + 1
if (@month<7) and (@day>31)
begin
set @day= 1
set @month = @month + 1
set @date = @date + 70
end
else if (@month>6) and (@day>30)
begin
set @day= 1
set @month = @month + 1
set @date = @date + 71
end
else
set @date = @date + 1
end
delete from #tblDate where dt=(select top 1 dt from #tblDate order by dt desc)
select * from #tblDate
drop table #tblDate