I have a stored procedure that works fine in sql server 2000, but, after migrating to 2008 is now failing with an error 'conversion of the varchar value '263' overflowed an INT1 column.
Also, the sp uses a temp table to first load data and then extract from the temp table. In SSMS the intelisense is flagging the 2nd usage of the temp table and stating invalid object name (but, not sure that's related to the first issue.
The code is like:
Select field1, field2, etc
Where field_date1 In (Select Max(field_date1) from tblTest) <<<<<error msg report this line as failing
exec('select * from #Temp') <<<this test line executes fine
Insert Into tblTest1 ( fields listed here )
Select a.field1, a.field2, etc <<<<intelisense not recognizing
From #Temp as a <<<intelisense error, invalid object name