Oracle Stored Procedure that return Parameters of type TABLE in BIRT2.1 [message #200286] |
Fri, 10 November 2006 11:21  |
Eclipse User |
|
|
|
Originally posted by: harikrishnan_j2003.yahoo.co.in
Sir,
I have one scenario for reporting,the scenario is
I take two fields from emp table, say empname,empno and check if empno = 1
then i take fields from empsalary table and display it ,else i take
fields from empdesignation table and display it.Hence for this scenario. I
have written stored procedure that return parameters of type TABLE,The
problem araises when i try to execute it BIRT2.1.1 it shows following
error.
I have also seen BUG 117166 in that they said this feature is considered
for BIRT2.1 release hence i downloaded that version and tried.
ERROR MSG:-
--------------
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.1.1.v20060922-1058
Error Code:odaconsumer.CannotPrepareStatement
Error Message:Failed to prepare the following query for the data set type
org.eclipse.birt.report.data.oda.jdbc.SPSelectDataSet.
Error preparing SQL statement.
SQL error #1: Non supported SQL92 token at position: 1:
{
DECLARE
pocursor refcursorexample.po_tbl;
BEGIN
refcursorexample.poproc (null, pocursor);
FOR i IN pocursor.FIRST .. pocursor.LAST
LOOP
DBMS_OUTPUT.put_line ( pocursor (i).empno
|| ' => '
|| pocursor (i).empsalary
);
END LOOP;
DBMS_OUTPUT.put_line ( 'No of Records - '||pocursor.count);
DBMS_OUTPUT.put_line ( pocursor (5).empno
|| ' => '
|| pocursor (5).empsalary
);
END;
}
Please Suggest a way to overcome this problem as i need this for my
reports desperately.
Thankyou
Harikrishnan J.
|
|
|
Re: Oracle Stored Procedure that return Parameters of type TABLE in BIRT2.1 [message #200898 is a reply to message #200286] |
Wed, 15 November 2006 01:32  |
Eclipse User |
|
|
|
Actually the support to this feature is in BIRT 2.2 rather than 2.1.1. So if
you download the latest nightly build of BIRT 2.2 you will find the Oracle
Store Procedure which return the Ref Cursor(The "Table" type you mentioned)
is supported.
Thanks.
Lin
"Harikrishnan" <harikrishnan_j2003@yahoo.co.in> wrote in message
news:e21fc544742f59763d1e7ae24cf6513a$1@www.eclipse.org...
> Sir,
> I have one scenario for reporting,the scenario is
> I take two fields from emp table, say empname,empno and check if empno = 1
> then i take fields from empsalary table and display it ,else i take
> fields from empdesignation table and display it.Hence for this scenario. I
> have written stored procedure that return parameters of type TABLE,The
> problem araises when i try to execute it BIRT2.1.1 it shows following
> error.
>
> I have also seen BUG 117166 in that they said this feature is considered
> for BIRT2.1 release hence i downloaded that version and tried.
>
>
>
> ERROR MSG:-
> --------------
> A BIRT exception occurred.
>
> Plug-in Provider:Eclipse.org
>
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:2.1.1.v20060922-1058
>
> Error Code:odaconsumer.CannotPrepareStatement
>
> Error Message:Failed to prepare the following query for the data set type
> org.eclipse.birt.report.data.oda.jdbc.SPSelectDataSet.
>
> Error preparing SQL statement.
> SQL error #1: Non supported SQL92 token at position: 1:
>
> {
> DECLARE
> pocursor refcursorexample.po_tbl;
> BEGIN
> refcursorexample.poproc (null, pocursor);
>
> FOR i IN pocursor.FIRST .. pocursor.LAST
> LOOP
>
> DBMS_OUTPUT.put_line ( pocursor (i).empno
> || ' => '
> || pocursor (i).empsalary
> );
> END LOOP;
> DBMS_OUTPUT.put_line ( 'No of Records - '||pocursor.count);
> DBMS_OUTPUT.put_line ( pocursor (5).empno
> || ' => '
> || pocursor (5).empsalary
> );
> END;
> }
>
>
> Please Suggest a way to overcome this problem as i need this for my
> reports desperately.
>
>
> Thankyou
> Harikrishnan J.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03141 seconds