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


Posted Date: 03 Jul 2008    Resource Type: Code Snippets    Category: SQL
Author: M. IrfanMember Level: Gold    
Rating: Points: 3



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



For more details, visit http://matespoint.blogspot.com/2008/03/passing-data-from-one-sp-to-other-sp.html




Responses

Author: UltimateRengan    10 Jul 2008Member Level: Diamond   Points : 0
hi,
good one , continue posting such valuable things



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: Getting all triggers from a database
Previous Resource: IF Exist vs Count
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use