Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    1

    Unanswered: returning a list from a proc within a proc

    I have a stored proc (procA) that returns a variable number of dates using a select stmt.

    I'd like to use these dates within another stored proc (procB)

    Is there a way to do this other than creating a table in tempdb within procA and then cleaning it up in procB?

    I'm using ASE 12.5

    thanks in advance

  2. #2
    Join Date
    Jan 2003
    Location
    Geneva, Switzerland
    Posts
    353
    The only other way that I can think of is to create a proxy table for procA, and then use that to get the data in procB. Check the CREATE EXISTING TABLE command in the reference manual, and the Component Integration Services manual for more information.

    Note that there are certain limitations with this functionality, so read up on it before you implement this.

    Michael

  3. #3
    Join Date
    Dec 2006
    Posts
    7
    >>Is there a way to do this other than creating a table in tempdb within procA and then cleaning it up in procB?

    If you use hash-table [temporary temp table], it will live only for the session and also it will be automatically deleted once the session is over. error handling is important for this in B [check if #myTable1 exists then proceed] also it is good practise to have a "commented create statement of #temp table in B" as well.

Posting Permissions

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