637

Eroare la executarea unei functii SQL

am asha functie:CREATE FUNCTION getIdList (@ex_cond nvarchar(400)) RETURNS varchar(4000) AS BEGIN DECLARE @idlist varchar(4000)DECLARE @sql_exec nvarchar(4000)SET @idlist = ''SET @sql_exec = 'SELECT @idlist = @idlist + CASE WHEN @idlist '''' THEN '','' ELSE '''' END +'+@ex_condEXEC sp_executesql @sql_exec, N'@idlist varchar(4000) out',@idlist outreturn @idlistENDcond o chem:select dbo.getIdList('').da eroarea:Server: Msg 557, Level 16, State 2, Procedure getIdList, Line 9Only functions and extended stored procedures can be executed from within a function.Carei fishca shi este extended stored procedures, parca nimic in plus
0