有沒有什麼辦法可以調用多標量表值函數那樣的存儲過程?在多標量表值函數中調用存儲過程?
注:該查詢返回錯誤:
Invalid use of a side-effecting operator 'INSERT EXEC' within a function.
T-SQL代碼:
CREATE FUNCTION fnCrSum
(
@ay nvarchar(100), @yil nvarchar(4), @tip nvarchar(25)
)
RETURNS
@tablo TABLE
(
id int,
ref_num int,
last_name nvarchar(200),
grup nvarchar(200),
analist nvarchar(200),
durum nvarchar(10),
start_dt int ,
end_dt int,
duration int,
type nvarchar(10),
bildirim nvarchar(200)
)
AS
BEGIN
DECLARE @exec NVARCHAR(250)
SET @exec = 'exec dbo.spCrSum ''' + @ay + ''', ''' + @yil + ''', ''' + @tip + ''''
INSERT INTO @tablo
exec (@exec)
RETURN
END
GO
因爲在Business Objects Designer方面存在技術問題。 – juniorDev