Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > BOOK: Beginning SQL
|
BOOK: Beginning SQL
This is the forum to discuss the Wrox book Beginning SQL by Paul Wilton, John Colby; ISBN: 9780764577321
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning SQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2010, 03:10 AM
Authorized User
 
Join Date: Aug 2010
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Cade_Feng
Post How to save to a temp table after execute a sproc

Hi, Everybody

How to save to a temp table after execute a SPROC<Store procedures>.
__________________
Wana be a .net developer.
Sincere yours
Cade_Feng

Last edited by Cade_Feng; September 10th, 2010 at 03:29 AM..
 
Old September 10th, 2010, 02:44 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

You mean you want the TEMP TABLE to exist *after* the Stored Procedure is finished?? If so, why use a TEMP table? Why not use a REAL table??

Anyway, the general rule is that a temporary table will persist for so long as the same connection remains open. So you could create the temp table in one SP and then use it in another SP, so long as you do *NOT* close the connection in between and so long as both SP's are called using the same connection.

Most of the time, though, if you want a table to persist from one query to another, you might want to think about *NOT* using a temp table. Most of the time. Not a hard fast rule.
 
Old September 12th, 2010, 09:06 PM
Authorized User
 
Join Date: Aug 2010
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Cade_Feng
Post

yeah,At the beginning I don't understand how to use SP, but now I know How it is work.cause I'm a beginner. Anyway, Thanks for your answer. I thought I should change another way to solve this problem.
__________________
Wana be a .net developer.
Sincere yours
Cade_Feng





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save DataGridView to temp dataset smithsf22 ADO.NET 1 April 17th, 2008 10:14 PM
Copy whole structure of table in #temp table maulik77 SQL Server 2000 2 December 21st, 2006 02:42 AM
Excel Workbook Save: Trap Temp file creation Shasur Excel VBA 0 July 3rd, 2006 10:07 PM
When a sproc or table was Last Used dlandolin SQL Server 2000 1 September 29th, 2005 08:09 PM
nested sproc temp table cole SQL Language 1 June 9th, 2005 05:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.