Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002
    Posts
    104

    Unanswered: capture data from a stored proc.

    Hi,

    Can you please tell me how can i dump the data from a stored proc into a temp table for further manipulation.

    I cannot change the SP.

    sybase version: 12.5

    for ex:

    create procedure a
    as
    begin
    -----
    ---- some stmt

    select * from tab1

    end

    i want to capture the output from this proc. into a temp table.

    any help is appreciated,

    --Pooja

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    You can create a proxy table that maps to the proc, and then do a select from the proxy table into a temp table. Something like

    Code:
    create existing table foo (column names) as "server.db.owner.procname"
    See the "create existing table" entry in the Commands Reference manual for details about this functionality.

    Michael

  3. #3
    Join Date
    Jul 2006
    Posts
    13
    hi
    that is other method

    you can use create proxy table for the stored procedure without specifying a column list. Component Integration Services derives the column list from the metadata it obtains from the stored procedure.
    example:
    create proxy_table tab_stored_procedure
    at "loopback.db1.dbo.my_stored_procedure"

    for more information about create proxy_table see online books cooands.pdf

    you must create loopback server as:
    exec sp_addserver 'loopback',null,@@servername

    M. Hassan

Posting Permissions

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