You are here: Re: How do you create ##Temp tables if they don't exist, use them if they do? « MsSQL Server « IT news, forums, messages
Re: How do you create ##Temp tables if they don't exist, use them if they do?

Posted by Erland Sommarskog on 09/02/06 09:00

M Bourgon (bourgon@gmail.com) writes:
> For me, it's mostly a matter of not having to have _another_ random
> table that I'll come back to in 5 years and wonder what's going on. We
> have a bunch of those already, and I can't reuse one in case they run
> simultaneously. The reason it's a global temp table is that so that if
> it's running long, I can take a look. (Yes, I know I could do that if
> it were a permanent table.)

We have a bunch (> 20) of such tables in our system. They are also very
easy to identify, as we have a naming convention for them. In our case,
the convention is that the table table ends in -aid. You may pick another
convention, but the key is to have a way to tell from the name what kind
of table this is.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация