Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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 October 2nd, 2005, 07:23 PM
Authorized User
 
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default result of SP to be insert into table

hi guys,
heres my code
create procedure dbo.mypj
@period datetime
@coname nvarchar(50)

declare @temptable table( counterid int identity(1,1)),
logdate datetime,coname nvarchar(50)
select * from @temptable


i need to run this in another procedure and get the result and insert it into another table.

is this possble?
i cannot insert another code inseide this same SP because of another comp.

hope u can help me..tnx



 
Old October 3rd, 2005, 12:38 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Insert into a global temp table (##temp) or just insert into a physical table then delete it when you are done.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Trigger & SP (Table Updates) Neal SQL Server 2000 6 April 25th, 2006 09:45 AM
Executing a SP for each recordset of a Table anandham SQL Server 2000 1 October 19th, 2005 06:34 PM
Using a SP result set in a FROM clause Bernard Omiple SQL Server 2000 1 October 3rd, 2003 05:38 AM
getting the result of an SQL INSERT pankaj_daga SQL Server 2000 2 September 30th, 2003 04:25 AM





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