'年'+yue+'月份</h2></tr></th><tr><td>星期日</td><td>">

SQL Server静态页面导出技术3

80酷酷网    80kuku.com

  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
    首先请读者通读上面的代码,以便对它有一个大概的了解。下

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: