sarafpradeep (10/14/2013)
Thanks to all, I got this solved. I have assigned a GUID to the temp table name and built/select/drop it dynamically. I have tested it and it is working perfect.Once again thanks everyone.
That's still a lot of overkill. Read about the partitioned views I told you about. Also, if you've gone to a GUID name for a Global Temp table to try to overcome the "problems" of using dynamic SQL, then you're asking for trouble in the future.
--Jeff Moden
Change is inevitable... Change for the better is not.