DECLARE BLBL_CURSOR CURSOR FOR
SELECT ref.RefBillID FROM Table2 ref
WHERE [email protected]_BillID
OPEN BLBL_CURSOR
FETCH NEXT FROM BLBL_CURSOR INTO @sRefBillID
WHILE @@FETCH_STATUS = 0
BEGIN
--exec dbo.SP_Recall @sRefBillID, @rtnCode output, @rtnText output
FETCH NEXT FROM BLBL_CURSOR INTO @sRefBillID
END
CLOSE BLBL_CURSOR
DEALLOCATE BLBL_CURSOR
时间: 2024-10-10 04:18:40