Ho tre tabelle con dati diversi e devo inserire in una tabella TEMP e restituire quella tabella in StoredProcedure.Come inserire più istruzioni select in una tabella temporanea
ho cercato come:
-- 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
Visualizzazione errore come
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.
Grazie. Funziona bene. –
@Dineshalla Il vostro benvenuto –