• nareshmsbi13 (5/8/2013)


    I have execute my stored procedure using a select statement like

    Exec SP where select * from view,wt is the finall out put of this query can some one tell me the answer,,

    And one more thing is have to manipulate the Temprory tables,Is it manipulate the temprory tables ,but how some one tell me the answer with an example

    you will need to create a temporary table to capture the stored proc results: you have to know the datatypes to build your table beforehand:

    CREATE TABLE #tmp(

    view varchar(30),

    wt varchar(30) )

    --insert the results into the properly shaped temp table

    INSERT INTO #tmp

    EXEC pr_MyProcedure @Param = 42

    SELECT * FROM #tmp

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!