How do I set a parameter to the result of an EXECUTE?
I tried this but got an error.
Set @Y = EXECUTE (@X)
(the value of @X is a valid select statement)
So that :
Set @X = 'Select top(1) item from dbo.sales where ....'
returns a value.
But I need the value assigned to @Y