any idea what is wrong with this code? i am getting Msg 102, Level 15, State 1, Line 9 Incorrect syntax near '')'.
declare @t int = 1, @p int = 1 DECLARE @sqlCommand varchar(1000) SET @sqlCommand = 'SELECT * FROM OPENROWSET(''SQLNCLI'',''server=.\sqlexpress;Trusted_Connection=yes'',''SET NOCOUNT ON;SET FMTONLY OFF;EXEC [BSC_DB].dbo.SelectScorecardGraphData ''''' + cast(@t as varchar(10)) + ''''',''' + cast(@p as varchar(10)) ''')' EXEC @sqlCommand