Information générale
Forum:
Microsoft SQL Server
><snip>
>>3. cannot return a value directly, it only returns a result set, hence the temp table. also, must use temp table rather than table variable, since you cannot insert into...exec sp..
using a table var.
><snip>
>
>Hi Trey,
>
>Take a look at How to return a value from dynamicaly executed T-SQL code FAQ #8130
This example uses EXEC, which can only be used in a UDF for execution of extended stored procedures.
I need to be able to do it in a function because I need to call the function from a SELECT.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement