存储过程+游标
来源:互联网 发布:透明机箱知乎 编辑:程序博客网 时间:2024/05/16 12:26
declare @str varchar(8000)
declare @currentValue numeric(12)
declare @previousValue numeric(12)
declare @currentTime datetime
declare @previousTime datetime
set @str = ''
declare mycur cursor for
select S_value, timestamp from sj where S1 = @code order by TimeStamp
open mycur
fetch next from mycur into @previousValue, @previousTime
while @@FETCH_STATUS = 0
begin
fetch next from mycur into @currentValue, @currentTime
set @str = @str + ltrim(rtrim(str(@currentValue - @previousValue,15,0))) + ' '
set @previousValue = @currentValue
set @previousTime = @currentTime
end
close mycur
deallocate mycur
select @str
GO
- 存储过程、游标
- 游标与存储过程
- 存储过程+游标
- 存储过程和游标
- 存储过程使用游标
- 存储过程返回游标
- oracle存储过程,游标
- 存储过程游标
- 存储过程游标
- 存储过程 游标
- 存储过程_游标
- 存储过程及游标
- oracle 存储过程 游标
- 存储过程游标:指针
- 存储过程之游标
- 存储过程和游标
- 存储过程 游标 相关
- csdn游标,存储过程
- Nginx介绍
- 将Fat格式转换成NTFS格式!
- JQuery获取和设置Select选项方法
- RMAN未使用catalog备份丢失控制文件的恢复方法
- PHP生成图片缩略图源代码
- 存储过程+游标
- 18.2.2 在不同主机上使用用户管理备份建立物理备用数据库
- Web优化的14条法则及我们的实际应用
- DIV+CSS+JS二级树型菜单,刷新无影响
- 软件的版本alpha,beta,rc,final等等含义
- IT知名网站[转载]
- 我的博客
- Java Web应用快速开发平台-OpenJWeb v1.2学习版推广方案
- 《C++ Template. The Complete Guide》笔记之一 缘起