Forum Discussion
McGran
2 years agoAdvocate II
Refresh Failure Due to Temp Database Already Existing
Hi there, I have a report that was written a couple of years ago and has been merrily refreshing away without trouble until the last week or so (earliest failure I can see in refresh history is 2...
- Anonymous1 year ago
We added code to drop the temp table at the start of each source query that we had used temp tables in.
IF OBJECT_ID(N'tempdb..#tTempTableName') IS NOT NULL
BEGIN
DROP TABLE #tTempTableName
ENDAnother solution one of my team mates found was to convert their temp tables to ctes.
This is a work around we implemented but does not adress the core issue.