Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > BOOK: Beginning SQL
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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.
Reply With Quote
  #2 (permalink)  
Old September 10th, 2010, 02:44 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,652
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.
Reply With Quote
  #3 (permalink)  
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01: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



All times are GMT -4. The time now is 02:59 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.