By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,237 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,237 IT Pros & Developers. It's quick & easy.

Using as in a cursor

P: n/a
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;

Sep 22 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sebastian Moderlak wrote:
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?
The DB2 server provides the exposed column name and the base column name.
Are you sure you are looking at the right attribute in ODBC?

Cheers
Serge

PS: Platform, version would be helpful
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 22 '06 #2

P: n/a
The DB2 server provides the exposed column name and the base column name.
Are you sure you are looking at the right attribute in ODBC?
Hi Serge,

thanks for your help. I've looked for the exposed column name and found
them.
Now it works fine.

Greetings from Germany
Bas
Sep 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.