Professional Web Applications Themes

Resultset of a stored procedure - Microsoft SQL / MS SQL Server

I think you can insert the result into a temp table.. create table #tmp (....) insert into #tmp exec('sp_theSP') -- Do you'r stuff drop table #tmp Lars-Erik "Peter Piry" <at> wrote in message news:phx.gbl...  from ...

  1. #1

    Default Re: Resultset of a stored procedure

    I think you can insert the result into a temp table..

    create table #tmp (....)

    insert into #tmp
    exec('sp_theSP')

    -- Do you'r stuff

    drop table #tmp

    Lars-Erik

    "Peter Piry" <at> wrote in message
    news:phx.gbl... 
    from 


    Lars-Erik Guest

  2. #2

    Default Re: Resultset of a stored procedure

    You can use temporary tables in this case. Before you use temporary tables,
    you however need to know the strucuture of the result set that will be
    returned from your other stored procedure. Once this is done, you can write
    code like the following:

    CREATE TABLE #Temp (au_id VARCHAR(100))
    INSERT INTO #Temp EXEC yourProcedure
    SELECT * FROM #Temp
    DROP TABLE #Temp
    --
    HTH,
    SriSamp
    Please reply to the whole group only!
    http://www32.brinkster.com/srisamp

    "Peter Piry" <at> wrote in message
    news:phx.gbl... 
    from 


    SriSamp Guest

  3. #3

    Default Re: Resultset of a stored procedure

    Peter Piry wrote: 

    For more details, see Erland's article here:
    http://www.algonet.se/~sommar/share_data.html

    HTH,
    Bob Barrows


    Bob Guest

  4. #4

    Default Re: Resultset of a stored procedure

    thanks, this works!

    greetins,

    Peter
    "Peter Piry" <at> wrote in message
    news:phx.gbl... 
    from 


    Peter Guest

Similar Threads

  1. Caching a resultset from a stored procedure
    By zax_srb in forum Coldfusion Database Access
    Replies: 0
    Last Post: January 26th, 03:15 PM
  2. Procedure wrapper needs 2nd Resultset?
    By Jonathan Beam in forum ASP
    Replies: 1
    Last Post: September 27th, 03:31 AM
  3. stored procedure and resultset
    By Frank in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 14th, 05:38 PM
  4. Stored Procedure not returning the wanted resultset
    By Henning Kongsgaard in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 4th, 08:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139