|
|
Archives of the TeradataForum
Message Posted: Thu, 11 Jun 2015 @ 15:23:18 GMT
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
| |