We use table variables extensively in our sp's.  They seem to work quite
nicely.  Also, bol (books online) mentions that they perform better than
temp tables.

Andy

-----Original Message-----
From: A.Little [mailto:A.Little@;open.ac.uk]
Sent: Tuesday, November 05, 2002 2:43 AM
To: CF-Talk
Subject: RE: Temporary tables in SQL2K


Nevermind, I've found I can use the TABLE variable type in my sp so the
table is only created locally to the sp (btw, this is new to SQL2K).

Any advice/experience on the performance of this would still be appreciated,

Alex

> 
> I'm writing a stored procedure (in SQL Server 2K) in which I 
> need to create
> a couple of temporary tables (which are dropped when the sp 
> has completed).
> 
> How do I get around the fact that 2 users of the website may 
> run the sp at
> (precisely) the same time, creating the possibility that one 
> of the sp's
> drops the temp table before the other has finished with it.
> 
> The SQL documentation refers to the fact that each 
> 'connection' will create
> it's own copy of the temp table - avoiding the problem above, 
> but when the
> db is connected to the website, I only have the one 
> connection between CF
> and SQL, so the problem may occur - or will it?
> 
> Does anyone have any advice/best practice for this situation?
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to