Results 1 to 10 of 10

Thread: Multi resultset

  1. #1
    Join Date
    Jul 2009
    Posts
    12

    Unanswered: Multi resultset

    Hi...

    Does anybody know how can i return several resultset?

    I have several temporary tables, and I want return those all as resultset. I can do it for a single table, but how to do it with several tables?

    Thanks in advance.

  2. #2
    Join Date
    Jul 2009
    Posts
    37
    Not entirely sure what you want to do here - I assume you want a single result set with all the tables in? This is only possible if you're tables have the same column types...

    select stuff, stuff2, stuff3
    from temptable1
    union all
    select stuff4, stuff5, stuff6
    from temptable2
    union all
    select stuff7, stuff8, stuff9
    from temptable3
    order by 3

    (I have a feeling this isn't what you're after though. if it's not, you have to have separate selects and separate result sets for each).

  3. #3
    Join Date
    Jul 2009
    Posts
    12
    Yes, I want to return separate result set. How can I do that?

  4. #4
    Join Date
    Jul 2009
    Posts
    37
    Your language will vary, of course, but the general way would be...

    Connection.Connect();

    Recordset1 = Connection.getResultSet(" select * from customers ");

    Recordset2 = Connection.getResultSet(" select * from bank_details ");

    Recordset3 = Connection.getResultSet(" select * from orders ");

    ...etc...

  5. #5
    Join Date
    Jul 2009
    Posts
    12
    Hi...

    I can't do it that way. Thanks anyaway.

    Best Regards,

    Fernando Almeida.

  6. #6
    Join Date
    Apr 2007
    Location
    Jundiai / SP - Brasil
    Posts
    311
    please, be more clear! give more details!
    What language are you using?
    what version of IDS?
    What the difficult to fetch a SELECT? this is a basic thing for any application that access a database....
    ________________________________________
    César Inacio Martins
    Jundiai / SP - Brasil
    http://www.imartins.com.br/informix - em Português
    http://www.imartins.com.br/informix - English (translated by Google).
    ________________________________________

  7. #7
    Join Date
    Jul 2009
    Posts
    12
    Hi ceinma...

    The IDS version is 11.50 FC1. I'm doing stored procedures, and I was trying to return several different result set, but it's not possible to do it with informix IDS. That is a feature it simply doesn't have.

    I need to reach it using another approach.
    Thanks.

    Best Regards,
    Fernando Almeida.

  8. #8
    Join Date
    Apr 2007
    Location
    Jundiai / SP - Brasil
    Posts
    311
    I don't have much time to help with details now , try work with WITH RESUME: WITH RESUME Keyword
    Plus the TABLE operator...

    Look this page : Utilizar uma stored procedure em um select no lugar de uma tabela | IMartins
    Is in Portuguese , but the Informix code are the same...
    ________________________________________
    César Inacio Martins
    Jundiai / SP - Brasil
    http://www.imartins.com.br/informix - em Português
    http://www.imartins.com.br/informix - English (translated by Google).
    ________________________________________

  9. #9
    Join Date
    Apr 2007
    Location
    Jundiai / SP - Brasil
    Posts
    311
    ________________________________________
    César Inacio Martins
    Jundiai / SP - Brasil
    http://www.imartins.com.br/informix - em Português
    http://www.imartins.com.br/informix - English (translated by Google).
    ________________________________________

  10. #10
    Join Date
    Jul 2009
    Posts
    12
    César, I'm portuguese, hence there are no problem.
    I know work with the keyword WITH RESUME.
    Anyway, that can't help me. However TABLE it's a nice funcionality.

    Thanks

    Valeu cara.

    Fernando Almeida.

Posting Permissions

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