SQLServer游标使用方法
时间:2011-01-27 来源:nick轩
declare OrderID cursor for
select TruckNo from FT_Truck where Supplier='' and OccurDate between '2010-12-03' and getdate()
open OrderID;
fetch OrderID into @BizNo;
while(@@FETCH_STATUS=0)
begin
EXEC [TF_Cala_Order_Cost_AP_SP] @ACTIONTYPE='Cala_Appl_Quotation_AP',@BizNo=@BizNo
fetch OrderID into @BizNo;
end
close OrderID;
deallocate OrderID;
相关阅读 更多 +