Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Call This SP
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
How To Call This SP
Miscellaneous
Thread ID:
01324458
Message ID:
01324458
Views:
55
What's the correct syntax for calling this SP for each row to be returned?
DECLARE @iInventoryOnHand INT
DECLARE @sProdCode VARCHAR(15)


-- I want to call this proc for each record. 
EXEC spGetInventoryOnHand @sProdCode, @iInventoryOnHand OUTPUT

SELECT i.sProduct_CD, <<call SP here>>
	FROM Inventory i
	JOIN Product p ON p.sProduct_CD = i.sProduct_CD
	WHERE i.decInv_Physical_Qty <> 0 OR
		  (@iInventoryOnHand > 0 and p.sCommodity_CD <> 'M')
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform