Calling a Procedure when trying to create a variable within a query - TSQL
Posted on 2014-10-09
I am wondering if this is possible.
I understand how to create a variable within my query - when I am assigning a value from a table query to the variable. However I am wondering is it possible to instead of pulling the value from a query to actually pull it from a stored procedure?
DECLARE @Payout Float
SELECT @Payout = SUM(revenue)
(EXEC [dbo].[mystoredprocedure] '2014-09-01','2014-10-01')SUBQ