Crystal Reports 和sql-server共同进行报表的开发--存储过程-实践[4]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 fgwf1 的 blog

        declare cur3_5 cursor for select distinct(cr.id) from ahd.ahd.call_req as cr left outer join ahd.ahd.ztr_his as zh on cr.persid=zh.call_req_id where cr.type='i' and cr.open_date>@begin and cr.open_date<@end and zh.to_cnt = @userid
        open cur3_5
        set @total = @@cursor_rows
        close cur3_5
        deallocate cur3_5

        insert into #temp_proc3 values (@userid , @handled , @total)
        fetch next from cur3_2 into @userid
        end
    close cur3_2
    deallocate cur3_2
    select * from #temp_proc3
    drop table #temp_proc3

d:将日期格式转换成整型
    fgw_util1.txt

--fgw_util1
create procedure [ahd].[fgw_util1] (@time datetime, @seconds int output)
as
   set @seconds=datediff(ss,'1970-01-01 00:00:00', @time)
go

本文关键:Crystal Reports 和sql-server共同进行报表的开发--存储过程-实践
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top