我要从Sell_Item表里读取订单sellID=123的物资和相关订单号(字符型)记录,然后再调用另一个存储过程重新统计每个物资的库存。订单的状态,请问该怎么写?
大致思路如下,请帮忙解决如何循环。
select itemid,LinkNum from [Sell_Item] where sellid=123
do while not rs.eof
Exec Stat_item @itemID
Exec Stat_LinkNum @LinkNum
loop只读取一个字段的方法知道了,读取2个字段要怎么写?呵呵。
大致思路如下,请帮忙解决如何循环。
select itemid,LinkNum from [Sell_Item] where sellid=123
do while not rs.eof
Exec Stat_item @itemID
Exec Stat_LinkNum @LinkNum
loop只读取一个字段的方法知道了,读取2个字段要怎么写?呵呵。
解决方案 »
- checkbox 复选的问题,请高手指点!
- 有一个带背景色的层在图片上时,图片onmousemove无效如何解决
- ?????【位非 ~ 】??????
- 一段JavaScript的flash图片幻灯和W3C标准兼容的问题
- 请问一个正则表达式的意思
- 动态改变超连接的透明度
- 如何在父页面中用javascript刷新iframe页面啊?
- window.opener.location.reload();怎样才能不弹出“重试”“取消”对话框??
- 怎样使一个html没有toolbar和menubar?急!
- 怎样分析别人的代码?有没有可以逆向调试分析的工具?
- 新人问题,CSDN里我头像名字低下的昵称在哪里改,马上结贴
- 求一函数
declare @linknum int
declare cur cursor for
select itemid,LinkNum from [Sell_Item] where sellid=123
open cur
fetch next from cur into @itemid,@linknum
while(@@fetch_status = 0)
begin
Exec Stat_item @itemID
Exec Stat_LinkNum @LinkNum
fetch next from cur into @itemid , @linknum
endclose cur
deallocate cur
-------------------t-sql循环记录要用游标来进行,你那是既有asp,又有 t-sql