Divya Parashar
how can we call the one store procedure with in the anoyher store procedure
Posted by Divya Parashar in Database | SQL Server on Dec 13, 2006
  • 0
  • 2
  • 6202
Do you know the answer for this question? Post it below.
Guest
Posted by ThamizhJain on Aug 30, 2008
  • 0

An Easy example: CREATE PROCEDURE prcCallprc ( Exec prcCalledPrc ) Go EXEC prcCallprc

Posted by canuja on Dec 16, 2006
  • 0

'This stored procedure is called by a business component or webpage 
'passing into two parameters, executes sp_ChildStoredProc and passes on value. 
'
The @Id OUTPUT returns the value.  

CREATE PROCEDURE sp_ParentStoredProc
(
@
col1 varchar(20)
@
ValuePassed varchar(50),
)
AS

declare @
Id int
EXEC sp_ReturnValue 
@ValuePassed, @Id OUTPUT

INSERT INTO SomeTable
(col1col2)
VALUES
(@col1, @Id)
RETURN
GO 


Join a Chapter
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | ABOUT US | REPORT ABUSE
2013© C# Corner. All contents are copyright of their authors.