I'm using SQL Server 2008 R2 and was wondering if there is another way of writing something like
EXEC dbo.myProcedure (SELECT columnName FROM TableName)
or
EXEC dbo.myProcedure @myStringVariable + 'other text'
so that these procedure calls actually work, without putting the whole stuff into a variable first.
Concatenation in inline execution of SP is not allowed..
Assuming that your @myStringVariable
compromises of certain text and certain dynamic text you want to concatenate it.
Why don't compute it and assign to @myStringVariable
before making the call to proc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With