Results 1 to 2 of 2

Thread: Result sets

  1. #1
    Join Date
    May 2006

    Unanswered: Result sets


    I am carrying out some analysis of legecy stored procedures.

    They are quite large. Some are 1000 lines of code.

    The question I am raising here is to do with result sets.

    There are many many selects with in the SP.

    Some are are used to initialisze local variables
    Some are selects gathering data needed for ulimate objective.
    while others are the actual result sets used by the calling C function.

    My question is if there are 10 selects in an SP will there be ten result sets ?

    How does SYBASE process the result sets from within a SYBASE stored procedure ? ( an example )


  2. #2
    Join Date
    Sep 2003
    If you are not assigning the SELECT to a variable OR a temp table, then yes it will just dump it to STDOUT or to whatever calling program.


    SELECT * from mytable
    SELECT * into #mytemp from mytable
    SELECT a from mytable1

    In the above example statement 1 and 3 will be displayed.

Posting Permissions

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