SQLServer游标使用方法
declare @BizNo varchar(30)
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;