server|靜態|頁面 BORDER="BORDER" ALIGN="CENTER"><th><tr><h2>'+convert(varchar(4),@year)+
'年'+@yue+'月份</h2></tr></th><tr><td>星期日</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td></tr>')
else
insert into ##daylist
values('</tr></table><TABLE BORDER="BORDER" ALIGN="CENTER"><th><tr><h2>'+
convert(varchar(4),@year)+'年'+@yue+'月份</h2></tr></th><tr><td>星期日</td><td>星期一</td><td>星期二</td><td>星期三</td><td>星期四</td><td>星期五</td><td>星期六</td></tr>')
end
if @tt<>0
if @xingqi < 7
set @outchar=@outchar+'<td><a href="'+@date+'/index.htm" TARGET="new">'+convert(varchar(2), @ri)+'</a></td>'
else
set @outchar=@outchar+'<td><a href="'+@date+'/index.htm" TARGET="new">'+convert(varchar(2), @ri)+'</a></td></tr><tr>'
else
begin
set @tt=1
set @outchar=
case
when @xingqi=1 then ''
when @xingqi=2 then '<td></td>'
when @xingqi=3 then '<td></td><td></td>'
when @xingqi=4 then '<td></td><td></td><td></td>'
when @xingqi=5 then '<td></td><td></td><td></td><td></td>'
when @xingqi=6 then '<td></td><td></td><td></td><td></td><td></td>'
when @xingqi=7 then '<td></td><td></td><td></td><td></td><td></td><td></td>'
end
if @xingqi < 7
set @outchar=@outchar+'<td><a href="'+@date+'/index.htm" TARGET="new">'+convert(varchar(2), @ri)+'</a></td>'
else
set @outchar=@outchar+'<td><a href="'+@date+'/index.htm" TARGET="new">'+convert(varchar(2), @ri)+'</a></td></tr><tr>'
end
insert into ##daylist values(@outchar)
set @yue2=@yue
set @outchar=''
fetch point3 into
@dy,@date,@yue,@ri,@xingqi,@year
end
close point3
deallocate point3
execute sp_makewebtask
@outputfile='d:\test\daylist.htm',
@query='select * from ##daylist',
@templatefile='d:\test\rili.tml',
@codepage=936
drop table ##daylist
首先請讀者通讀上面的代碼,以便對它有一個大概的瞭解。下