SQL Server靜態頁面匯出技術3

來源:互聯網
上載者:User
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
    首先請讀者通讀上面的代碼,以便對它有一個大概的瞭解。下

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.