After doing some RnD, i found a solution which really helped me a lot. Please use below TSQL statement(MS SQL SERVER) before you create any temp table.
if object_id('tempdb..#TableName) is not null drop table #TableName
then create your #TableName.
It will definitly help out alot in getting rid of displayed exception.