2
Reply

How can I use the result set from one stored procedure in another

haider ali

haider ali

14y
5k
0
Reply

    Hi Haider, your question is placed in wrong category i think. I take it as SQL question.

    -- Your first stored procedure can be a function returning a table

    CREATE FUNCTION somefunction

    RETURNS TABLE

    BEGIN

    DECLARE @resultset TABLE

    SET @resultset = SELECT * FROM SOMETABLE

    return @resultset

    END

     

    -- Your second stored procedure

    CREATE PROCEDURE someprocedure2

    AS

    BEGIN

    DECLARE @resultset TABLE

    SET @resultset = dbo.somefunction()

    -- now use this resultset

    END

    the main difference between abstract class and interface is abstarct class can have method in it while interface does not have
    more if you derive abstract class than it is not compulsory that you not need to create all the methods in the abstract class but if you implement interface than it is compulsory that you must have to implement all of its method.
    in short abstract class must be derived else it is useless and interface must be implemented else it is useless