DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: returning result sets from one sproc to use in another sproc

  1. #1
    David Satz Guest

    Re: returning result sets from one sproc to use in another sproc

    for which RDBMS ?

    "amy" <amykr@firstlogic.com> wrote in message news:3cb6f955$1@10.1.10.29...
    >
    > Does anyone know if you can have the following situation and if so how:
    > One stored procedure would call another stored procedure. The second
    > stored procedure would return a query result (more than one row) to the

    calling
    > stored procedure. The first stored procedure (the initial calling stored
    > procedure) would then be able to use this 'table' or result set to query
    > against.
    > NOTE: We so not want to use global temp tables or cursors.
    >
    > Thanks in advance!




  2. #2
    amy Guest

    returning result sets from one sproc to use in another sproc


    Does anyone know if you can have the following situation and if so how:
    One stored procedure would call another stored procedure. The second
    stored procedure would return a query result (more than one row) to the calling
    stored procedure. The first stored procedure (the initial calling stored
    procedure) would then be able to use this 'table' or result set to query
    against.
    NOTE: We so not want to use global temp tables or cursors.

    Thanks in advance!

  3. #3
    amy Guest

    Re: returning result sets from one sproc to use in another sproc


    SQL Server 7.0

    "David Satz" <davidNOSPAMsatz@yahoo.com> wrote:
    >for which RDBMS ?
    >
    >"amy" <amykr@firstlogic.com> wrote in message news:3cb6f955$1@10.1.10.29...
    >>
    >> Does anyone know if you can have the following situation and if so how:
    >> One stored procedure would call another stored procedure. The second
    >> stored procedure would return a query result (more than one row) to the

    >calling
    >> stored procedure. The first stored procedure (the initial calling stored
    >> procedure) would then be able to use this 'table' or result set to query
    >> against.
    >> NOTE: We so not want to use global temp tables or cursors.
    >>
    >> Thanks in advance!

    >
    >



  4. #4
    David Satz Guest

    Re: returning result sets from one sproc to use in another sproc

    2 ways I would do this ( in SQL 2K you could use a user defined function):

    1. create a temp table in SP1 and have SP2 insert into it when EXECed and
    then SP1 came use the data

    2. create a temp table in SP1 and then call SP2 using insert #temp EXEC SP2

    --
    HTH,
    David Satz
    Principal Web Engineer
    Hyperion Solutions
    { SQL Server 2000 SP2/6.5 SP5a } { Cold Fusion 5 SP1 } { VSS }
    (Please reply to group only - emails answered rarely)
    -----------------------------------------------------------------
    "amy" <amykr@firstlogic.com> wrote in message news:3cb6f955$1@10.1.10.29...
    >
    > Does anyone know if you can have the following situation and if so how:
    > One stored procedure would call another stored procedure. The second
    > stored procedure would return a query result (more than one row) to the

    calling
    > stored procedure. The first stored procedure (the initial calling stored
    > procedure) would then be able to use this 'table' or result set to query
    > against.
    > NOTE: We so not want to use global temp tables or cursors.
    >
    > Thanks in advance!




  5. #5
    David Satz Guest

    Re: returning result sets from one sproc to use in another sproc

    p.s. there is a database.sqlserver.general forum ;-)
    "amy" <amykr@firstlogic.com> wrote in message news:3cb702a3@10.1.10.29...
    >
    > SQL Server 7.0
    >
    > "David Satz" <davidNOSPAMsatz@yahoo.com> wrote:
    > >for which RDBMS ?
    > >
    > >"amy" <amykr@firstlogic.com> wrote in message

    news:3cb6f955$1@10.1.10.29...
    > >>
    > >> Does anyone know if you can have the following situation and if so how:
    > >> One stored procedure would call another stored procedure. The

    second
    > >> stored procedure would return a query result (more than one row) to the

    > >calling
    > >> stored procedure. The first stored procedure (the initial calling

    stored
    > >> procedure) would then be able to use this 'table' or result set to

    query
    > >> against.
    > >> NOTE: We so not want to use global temp tables or cursors.
    > >>
    > >> Thanks in advance!

    > >
    > >

    >




  6. #6
    amy Guest

    Re: returning result sets from one sproc to use in another sproc


    Thanks!

    "David Satz" <davidNOSPAMsatz@yahoo.com> wrote:
    >p.s. there is a database.sqlserver.general forum ;-)
    >"amy" <amykr@firstlogic.com> wrote in message news:3cb702a3@10.1.10.29...
    >>
    >> SQL Server 7.0
    >>
    >> "David Satz" <davidNOSPAMsatz@yahoo.com> wrote:
    >> >for which RDBMS ?
    >> >
    >> >"amy" <amykr@firstlogic.com> wrote in message

    >news:3cb6f955$1@10.1.10.29...
    >> >>
    >> >> Does anyone know if you can have the following situation and if so

    how:
    >> >> One stored procedure would call another stored procedure. The

    >second
    >> >> stored procedure would return a query result (more than one row) to

    the
    >> >calling
    >> >> stored procedure. The first stored procedure (the initial calling

    >stored
    >> >> procedure) would then be able to use this 'table' or result set to

    >query
    >> >> against.
    >> >> NOTE: We so not want to use global temp tables or cursors.
    >> >>
    >> >> Thanks in advance!
    >> >
    >> >

    >>

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center