全文预览

数据库实验报告5

上传者:upcfxx |  格式:doc  |  页数:5 |  大小:78KB

文档介绍
011-04-01' as date ) begin set @result = @result + @pre_balance *( datediff ( day , @pre_date , @ex_date ))* 2/ 36500 set @pre_balance = @balance set @pre_date = @ex_date end else begin set @result = @result + @pre_balance *( datediff ( day , @pre_date , CAST ( '2011-04-01' as date )))* 2/ 36500 set @result = @result + @pre_balance *( datediff ( day , CAST ( '2011-04-01' as date ), @ex_date ))* 3/ 36500 set @pre_balance = @balance set @pre_date = @ex_date end end while @ex_date > CAST ( '2011-04-01' as date ) fetch next from Calcursor into @ex_date , @balance begin set @result = @result + @pre_balance *( datediff ( day , @pre_date , @ex_date ))* 3/ 36500 set @pre_balance = @balance set @pre_date = @ex_date end end print ' 利息:'+ @result close Calcursor deallocate Calcursor 数据库实验报告-4- 四、实验总结

收藏

分享

举报
下载此文档