动态执行SP的问题
DECLARE @DBInstance NVARCHAR(100)
DECLARE @SQL NVARCHAR(500)
DECLARE @i NVARCHAR(500)
DECLARE @Fid NVARCHAR(500)
DECLARE @j nvarchar(10)
SET @Fid='1'
SET @i='10'
set @j='1'
SET @DBInstance='t_temp'
SET @SQL=@DBInstance+' '+@i +',@Fid OUTPUT'
EXEC (@SQL)
SET @SQL=@DBInstance+' '+@i +',@Fid OUTPUT'
EXEC sp_executesql @SQL,N'@Fid NVARCHAR(500) OUTPUT',@Fid OUTPUT
select @Fid