C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Passing Data from one sp to other sp using Temp Table.


Posted Date: 20 Mar 2008    Resource Type: Code Snippets    Category: SQL

Posted By: M. Irfan       Member Level: Gold
Rating:     Points: 5



Passing Data from one sp to other sp using Temp Table.

Hi,
Here I tried a trick, there may be others trick also to do the same.


CREATE PROCEDURE Proc_Record_Insertion
AS

-- This #Temp1 table is defined in the other sp which I am using here.

INSERT INTO #Temp1(id,info) VALUES(1,'Mohammad')

INSERT INTO #Temp1(id,info) VALUES(2,'Irfan');

INSERT INTO #Temp1(id,info) VALUES(3,'matespoint@gmail.com');

INSERT INTO #Temp1(id,info) VALUES(4,'matespoint.blogspot.com');

GO

-- This will create a sp Proc_TempTableCreate which create a Temp table and insert four recors into it.



CREATE PROCEDURE Proc_UseTempData

AS

BEGIN

CREATE TABLE #Temp1

(id int,

info varchar(40) )

-- Executing the sp

EXEC Proc_Record_Insertion

SELECT * FROM #Temp1

END




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to make a queue unavailable in SQL server
Previous Resource: COUNT(*) VS IF EXIST
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

conference call

Contact Us    Privacy Policy    Terms Of Use