Calling stored procedure from another stored procedure and returning result as new columns

Posted by luppi on Stack Overflow See other posts from Stack Overflow or by luppi
Published on 2010-04-10T14:58:56Z Indexed on 2010/04/10 15:03 UTC
Read the original article Hit count: 525

Filed under:
|

How to call stored procedure from another stored procedure and return the result as first one's column?

ALTER PROCEDURE [dbo].[GetItems]
AS
SET NOCOUNT ON

SELECT ID, AddedDate, Title,Description,
       Result of Stored Procedure "CountAll" call with parameter ID as Total 
FROM dbo.Table1

And also: how to be if CountAll stored procedure returns some columns and not just scalar?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server