View Single Post

   
  #1 (permalink)  
Old 02-27-2008, 08:17 AM
Sebastian Moderlak
 
Posts: n/a
Default Using as in a cursor

Hello Folks,

I've created a SP witch returns a resultset.
When I'm calling from the query manager, everthing is fine. (result here:
AGREEMENT and STORNO)
When I'm calling from ODBC, the related cols are so called as the sourcename
is (result here: col1 and col2)

What is going wron on ODBC - or on me?

Thanks for help.
Bas

#### the source ###########

CREATE PROCEDURE psht3agr(in strAdar char(1), in strAdnr char(8))
DYNAMIC RESULT SETS 1
LANGUAGE SQL
CALLED ON NULL INPUT
READS SQL DATA
INHERIT SPECIAL REGISTERS

BEGIN
DECLARE c1 CURSOR FOR
select col1 as AGREEMENT, col2 as STORNO
from table1
where col3 = strAdar
and col4 = strAdnr;

OPEN c1;
END;



Reply With Quote