October 15, 2013 at 8:13 am
sarafpradeep (10/9/2013)
Thank you Sean Lange, I did not think about it. I liked the idea of "Jeff Moden" but I am not sure about how to create a partitioned view.I would really appreciate if someone can help me or direct me to a forum having similar kind of solution.
Thanks again.
Read about the "partitioned view" in Books Online. If you don't know what that is, it's the "help" system for SQL Server and you can usually get there by pressing the {f1} key in SSMS. You should read about it... it'll really simplify this problem for you.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 15, 2013 at 8:15 am
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.
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply