How do i call procedure result into another

indradaman sharma
indrada...
116 Points
14 Posts

This is my first store procedure

CREATE PROCEDURE SP_GetValue1
AS
BEGIN

SELECT CustomerID, CustomerName, UserID, Password, CompanyName, IsVerified, IsActive, InsertedID, InsetedDate, UpdatedID, UpdatedDate, IPAddress
FROM Login_Customer

END

It give me back table with column.

Now i wan to create second store procedure 

GetValue2 and use my first procedure in it and want to get column CustomerName, UserID, Password, CompanyName. How do i get it,

Please help me

 

Views: 9631
Total Answered: 1
Total Marked As Answer: 0
Posted On: 07-Mar-2017 05:43

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
4916 Points
27 Posts
         

Hi indradaman,
I think, we can't return from procedure in t-sql. Also we can not use table as output parameter. So it is better to use function to return table. If it is necessary, you can use some table to store  and insert from first procedure and get through second procedure. 

Posted On: 07-Mar-2017 07:04
 Log In to Chat