I have three tables with different data, and I need to insert one TEMP table and return this table to StoredProcedure.
I tried like:
-- To get last 10 Days Letters count SELECT col1,col2,1 AS Type, LettersCount INTO #temp FROM tblData -- To get last 4 weeks Letters count SELECT col1,col2,2 AS Type, LettersCount INTO #temp FROM tblData -- To get month wise Letters count SELECT col1,col2,3 AS Type, LettersCount INTO #temp FROM tblData
Error display as
Msg 2714, Level 16, State 1, Line 16 There is already an object named '#temp ' in the database. Msg 102, Level 15, State 1, Line 24 Incorrect syntax near 'T'. Msg 2714, Level 16, State 1, Line 32 There is already an object named '#temp ' in the database.
source share