Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 11 Jun 2015 @ 15:23:18 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Error in returning multiple Result Sets from a Stored Procedure
 
From:   Frydryszak, Marek

Looks like odbc problem.

I tried simplified version - works from SA by .NET and from bteq.

     REPLACE PROCEDURE Sample_p ()  DYNAMIC RESULT SETS 2 BEGIN
       DECLARE cur1 CURSOR WITH RETURN ONLY FOR
          SELECT * FROM dbc.dbcinfo WHERE infokey='nosuchkey';
       DECLARE cur2 CURSOR WITH RETURN ONLY FOR
          SELECT * FROM dbc.dbcinfo WHERE infokey='version';

       OPEN cur1;
       OPEN cur2;
     END;

     call sample_p();

      *** Procedure has been executed.
      *** Warning: 3212 The stored procedure returned one or more result sets.
      *** Total elapsed time was 1 second.


      *** ResultSet# 1 : 0 rows returned by "GEO.SAMPLE_P".


      *** ResultSet# 2 : 1 rows returned by "GEO.SAMPLE_P".

     InfoKey                        InfoData
     ------------------------------ --------------------------------------------
     VERSION                        15.00.00.07


     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023