In my SP, I mix static SQL and dynamic SQL:
declare @result table
(
RowNum bigint,
Id_and_Title varchar(max),
DaysLeft int,
cat_id int
);
then, in the dynamic SQL I insert the result to that table:
DECLARE @TSQL NVARCHAR(max);
SET @TSQL = ......
(I use print @TSQL
so I'm sure that the query is OK)
insert into @result
EXECUTE sp_executesql @TSQL
select * from @result
but, when I try to import taht SP in VS 2010 Ultimate I see the message as I mentioned in the title. What causes that ? For many times I've occured that error but I still don't know what causes that