Danny Tramnitzke wrote :

>I have to get back a result-table, so I use "RETURNS CURSOR" .

>Like I the sapdb Docu, I the dbproc looks like this :

>create dbproc prog_one (IN input char(150)) RETURNS CURSOR AS
> VAR   outstr char(150);
>SET outstr = REPLACE (input, '�', 'Ae');

>$CURSOR = 'HOTEL_CURSOR';
>DECLARE :$CURSOR CURSOR FOR
>SELECT outstr FROM domain.columns where rowno <= 1 ;

>So, you see, that I want to get back a result-set with one field, which 
>contains the 'outstr' variable. (needed for a javabean, lying upper...) But 
>I haven't found out yet, how I could Select a variable, because then, Error 
>comes :

>Unknown Column Name

>I guess, it's only a tiny problem, but the Docu says to Selected Column 
>(select_column) :

>Syntax

><select_column> ::= <table_columns> | <derived_column> | <rowno_column> | 
><stamp_column>

><table_columns> ::= * | <table_name>.* | <reference_name>.* 
><derived_column> ::= <expression> [ [AS] <result_column_name>] | 
><result_column_name> = <expression>
><rowno_column> ::= ROWNO [<result_column_name>] | <result_column_name> = 
>ROWNO
><stamp_column> ::= STAMP [<result_column_name>] | <result_column_name> = 
>STAMP

><result_column_name> ::= <identifier>

>So, where is a '<variable_column>' or something like that?

I don't understand why you need the variable outstr. Just try the following :

create dbproc prog_one (IN input char(150)) RETURNS CURSOR AS
$CURSOR = 'HOTEL_CURSOR';
DECLARE :$CURSOR CURSOR FOR
SELECT REPLACE (input, '�', 'Ae') FROM sysdba.dual;

Regards,
Thomas

-- 
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to