Call Oracle Function from Eclipse BIRT (2.6.1) [message #872465] |
Wed, 16 May 2012 07:20  |
biji Missing name Messages: 1 Registered: May 2012 |
Junior Member |
|
|
Hi
I am using Eclipse BIRT 2.6.1 version.
I can call Oracle function in Eclipse Birt by creating a dataSet like
{? = call CASE MICCCSTARICWNOM.GetTariffText(?,?,?,?,?,?,?,?,?) WHEN TRUE THEN 1 ELSE 0 END}
But my problem is how to pass the user defined parameter Type to this function call (My Oracle function has Strcture Type as the parameter Type for this fucntion).
In BIRT, the different paramter Type which i can pass only String, Integer, Java Object, Decimal..
Anybody tried a kind of this scenario in your BIRT development?
Expecting Help :-).
|
|
|
Re: Call Oracle Function from Eclipse BIRT (2.6.1) [message #900942 is a reply to message #872465] |
Thu, 09 August 2012 07:43  |
Henning von Bargen Messages: 23 Registered: May 2011 |
Junior Member |
|
|
It's not a BIRT problem.
With JDBC you cannot use user-defined types (with reasonable effort).
Thus you have to create a PL/SQL wrapper function. It's simple.
For example, assume your complex type T is a record with a string and a date and you want to call a function F with expects an input parameter of type T.
You could create a wrapper function
Create_T (pi_text in varchar2, pi_dat in date) return T;
and then call from BIRT
or maybe (I tend to avoid Client variables of type DATE, using a string representation on the client side) call F (Create_T (to_date(?, 'DD.MM.YYYY HH24:MI:SS'), ?))
Things are more complicated if you want to SELECT complex types. This is not directly possible. You could try to use something like
with
base_query as (
select X -- where X is a type, say T
, Y
, ...
from ...
where ...
)
select
X.TEXT
, X.DAT
, Y
, ...
from base_query
|
|
|
Powered by
FUDForum. Page generated in 0.01406 seconds