run the below sql...I am getting the below error message. May I know what could be wrong here ?
There is already an object named '#Temp' in the database.
Query
IF (Select object_id('TempDB..#Temp')) IS NOT NULL
BEGIN
DROP TABLE #Temp
SELECT TOP 0 * INTO #Temp FROM db_template.dbo.DimTime
END
ELSE
SELECT TOP 0 * INTO #Temp FROM db_template.dbo.DimTime