Converting Oracle Functions to ODI
Does anyone have an example of converting an Oracle function to ODI?
FUNCTION <function_name> (
<parameters> [IN | OUT | IN OUT] [NOCOPY] <data_type>)
RETURN <data_type> [AUTHID <CURRENT_USER | DEFINER>] IS
<constant, exception, and variable declarations>
BEGIN
<code_here>;
END <function_name>;
Can you call a Function in ODI?
Yes you can call a PL/SQL or oracle funciton from ODI.
FOr that you will have to create a ODI procedure with technology as Oracle.
Call that function in to a PL/SQL "BEGIN END" block.
Value returned by function you can use there is self or can pass to an ODI variable.
Hope it helps!
Regards,
amit
Similar Messages
-
I am new to ODI. I need to call a function created on the database which return a value. In ODI I created a variable. In the select (of the variable) I don't know how to call the source table value that needs to be passed to the function.
My oracle function:
create or replace function return_timeid(trans_date in date)
return number is
Result number;
v_trans_date varchar2(30) := to_char(trans_date, 'dd-mon-rrrr hh24miss');
v_hour number := 0;
v_min number := 0;
begin
v_hour := substr(v_trans_date, 13, 2);
v_min := substr(v_trans_date, 15, 2);
case
when v_min between 1 and 30 then
result := (v_hour * 100) + 30;
when v_min = 0 then
result := v_hour * 100;
when v_min > 30 then
result := (v_hour + 1) * 100;
end case;
-- convert 2400 to 0000
if result = 2400 then
result := 0;
elsif result = 2430 then
result := 30;
end if;
return result;
end return_timeid;
The result will be a time ID, depending on the source record value in the source table. How do I keep the time ID in the variable that I created.
This is the select in my variable (Time_ID):
SELECT BIUSER.return_timeid(GPRS_HOME_CDRS.CALL_DATE_DT) FROM dual
this is my error:
904 : 42000 : java.sql.SQLException: ORA-00904: "GPRS_HOME_CDRS"."CALL_DATE_DT": invalid identifier
RegardsI tried to call the function in the mapping. My code:
biuser.return_timeid(GPRS_HOME_CDRS.CALL_DATE_DT)
but then I get the ORA-00936 (missing expression)
My code generated in the operator when loading the flow table:
insert /*+ APPEND */ into BIUSER.I$_FACT_ABIL_GPRS_T
DIMDATASOURCEID,
DIMDATARECORDTYPEID,
DIMDATEID,
DIMTIMEID,
DIMAPNID_IC,
DIMIMSIID,
DIMCALLLOCATIONID,
DIMCAUSERECCLOSEID,
CALLDURATION,
UPLINK_DATAVOLUME,
DOWNLINK_DATAVOLUME,
CALL_CHARGE,
DIMRATEPLANID,
TRANS_DATE,
DIMPEAKID,
DIMTARIFFCODEID,
DIMCHARGEID,
MOBL_NUM,
ACC_LINK_CODE,
CHARGED_UNITS,
CHARGED_DURATION,
CHARGED_VOLUME,
DISCOUNTED_VALUE,
DISCOUNTED_AMOUNT,
FACT_PROCESS_DATE,
CHRONO_NUM,
ORIGINATE_CELL_ID,
STAGE_PROCESS_DATE,
IND_UPDATE
select
case
When length(rtrim(C19_QOS_USED_1_V)) = 7 then 1
else 2
end case,
DIM_DATA_RECORD_TYPE.DIMDATARECORDTYPEID,
DIM_DATE.DIMDATEID,
biuser.return_timeid(C12_CALL_DATE_DT), DIM_APN.DIMAPNID,
to_number(DIM_IMSI_MSISDN.DIMIMSIMSISDNID),
to_number(DIM_CALL_LOCATION.DIMCALLLOCATIONID),
to_number(DIM_TERM_CAUSE.DIMTERMCAUSEID),
C5_CALL_DURATION_N,
.DATA_VOLUME_OUTGOING_1_N,
C17_DATA_VOLUME_INCOMING_1_N,
C1_CALL_CHARGE,
DIM_RATEPLAN.DIMRATEPLANID,
C12_CALL_DATE_DT,
to_number(DIM_RATEPLAN.DIMRATEPLANID),
DIM_TARIFF.DIMTARIFFID,
to_number(DIM_CALLCHARGE_TYPE_TB.DIMCALLCHARGETYPEID),
C2_MOBL_NUM,
C21_ACCOUNT_LINK_CODE_N,
C10_CHARGED_UNITS_N,
C9_CHARGED_DURATION_N,
C8_CHARGED_VOLUME_N,
C16_DISCOUNTED_VALUE_N,
round(C15_DISCOUNTED_AMOUNT_N/1000,4),
SYSDATE,
C13_CHRONO_NUM_N,
C6_ORGINATE_CELL_ID_V,
C3_STAGE_PROCESS_DATE,
'I' IND_UPDATE
from BIUSER.DIM_DATA_RECORD_TYPE DIM_DATA_RECORD_TYPE, BIUSER.DIM_DATE DIM_DATE, BIUSER.DIM_CALL_LOCATION DIM_CALL_LOCATION, BIUSER.DIM_APN DIM_APN, BIUSER.DIM_IMSI_MSISDN DIM_IMSI_MSISDN, BIUSER.DIM_TERM_CAUSE DIM_TERM_CAUSE, BIUSER.DIM_CALLCHARGE_TYPE_TB DIM_CALLCHARGE_TYPE_TB, BIUSER.DIM_TARIFF DIM_TARIFF, BIUSER.DIM_RATEPLAN DIM_RATEPLAN, BIUSER.C$_0FACT_ABIL_GPRS_T
where (1=1)
And (nvl(to_number(C14_SWITCH_CALL_TYPE_V),99999)=DIM_DATA_RECORD_TYPE.RECORD_TYPE)
AND (to_number(to_char(C12_CALL_DATE_DT,'RRRRMMDD'))=DIM_DATE.DIMDATEID)
AND (nvl(C11_MOBL_ORIGINATE_ZONE_CODE_V,'Undefined')=DIM_CALL_LOCATION.COUNTRY)
AND (nvl(C4_ACCESS_POINT_NAME_V,'Undefined')=DIM_APN.APN)
AND (nvl(C23_IMSI_NUM_N,99999999999)=DIM_IMSI_MSISDN.IMSI_NR)
AND (nvl(C20_CALL_TERMINATION_CAUSE_V,'XX')=DIM_TERM_CAUSE.TERMCAUSE)
AND (nvl(C18_CALL_CHRG_TYPE_V,'9')=DIM_CALLCHARGE_TYPE_TB.CALL_CHARGE_TYPE)
AND (nvl(C7_TARIFF_CODE_V,'999999')=DIM_TARIFF.TARIFF_CODE)
AND (nvl(C22_RATE_PLAN_CODE_N,99999)=DIM_RATEPLAN.RATEPLAN_CODE and
nvl(C7_TARIFF_CODE_V,'999999')=DIM_RATEPLAN.TARIFF_CODE)
minus
select
DIMDATASOURCEID,
DIMDATARECORDTYPEID,
DIMDATEID,
DIMTIMEID,
DIMAPNID_IC,
DIMIMSIID,
DIMCALLLOCATIONID,
DIMCAUSERECCLOSEID,
CALLDURATION,
UPLINK_DATAVOLUME,
DOWNLINK_DATAVOLUME,
CALL_CHARGE,
DIMRATEPLANID,
TRANS_DATE,
DIMPEAKID,
DIMTARIFFCODEID,
DIMCHARGEID,
MOBL_NUM,
ACC_LINK_CODE,
CHARGED_UNITS,
CHARGED_DURATION,
CHARGED_VOLUME,
DISCOUNTED_VALUE,
DISCOUNTED_AMOUNT,
FACT_PROCESS_DATE,
CHRONO_NUM,
ORIGINATE_CELL_ID,
STAGE_PROCESS_DATE,
'I' IND_UPDATE
from BIUSER.FACT_ABIL_GPRS_T -
How to convert Oracle function in UDB
Hi ,
i am writing this function in oracle.Could you please convert this function in UDB because i am new in this and dont know how to use decode function in UDB
Please following is the code for oracle.
CREATE OR REPLACE function fun ( localex varchar2,titlex varchar2)
return number
as x number;
begin
select sum ( decode (count (username),max(prereq_count),1,0) ) x into x from
SELECT
prereq_count,
username
FROM
table1
group by username ;
return x;
end fun;
Regards
VishalFirst, you posted in the wrong forum for UDB, this is DB2 on z/OS
Secondly, your question is not SAP related (at least I can't see that).
Thirdly, you posted the same question for SQL-Server:
want to convert function in SQL Server 2000
Markus -
How to bring oracle function into ODI
Hi,
I have a oracle function which I have to bring into ODI, could you please let me know how to do that?
Thanks!
Regards,
SupreethHi Supreeth ,
Before invoking a stored procedure from Oracle Data Integrator (ODI), run it outside ODI (i.e. SqlPlus), on the database, using the same database user as entered in the ODI Topology for this connection and make sure it is working properly .
Then, when invoking the stored procedure from Oracle Data Integrator (ODI):
1. Create an ODI Specific Procedure.
2. Insert a step and, in the "Technology" drill down box, choose the appropriate RDBMS. Leave the context to "<Execution Context>".
3. The precise syntax for calling RDBMS stored procedures in ODI may vary from one Technology to another one.
For Oracle technologies, the syntax is as follows:
BEGIN
<%=odiRef.getObjectName (pMode, My_Procedure, pLogicalSchemaName, pContextName, pLocation)%> (MY_PARAM1, MY_PARAM2...);
END;
where
* My_Procedure - is the stored procedure name
* MY_PARAM1, MY_PARAM2... - are stored procedure parameter values
* pMode, pLogicalSchemaName, pContextName, pLocation - are parameters of the getObjectName Substitution Method.
At my Oracle instance I have a function called MY_FUNCTION
So my syntax would be
<%=odiRef.getObjectName ("L","MY_FUNCTION","D")%>
Thanks,
Sutirtha -
Converting Stuff function from SQLServer to Oracle
Anyone out there found an Oracle counterpart for the SQL Server "stuff" function.
It is being used following an ascii(substr(variable)) locating all nonprintable characters and replacing with null.anjali5 wrote:
I am very new to oracle. I am trying to convert this function to oracle, but keep getting errors
USE [REF]
GO
/****** Object: UserDefinedFunction [dbo].[fnc_get_home] Script Date: 10/21/2011 17:50:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date, ,>
-- Description: <Description, ,>
-- =============================================
ALTER FUNCTION [dbo].[fnc_get_home]
@p_ui nvarchar(50), @p_dt datetime
RETURNS NVARCHAR(50)
AS
BEGIN
declare @v_home NVARCHAR(50);
select top 1 @v_home = HOME_CODE from dbo.activity_home_b
where UI = @p_ui
order by HOME_END_DT desc;
RETURN @v_home;
ENDI am very new to Volkwagen cars, but here is a picture of my old Toyota
My new car won't go
Tell me how to make my car go.
You refer to Oracle, but I wonder if this has anything to do with ACCESS.
post complete CREATE TABLE statement of Oracle Table
post INSERT for sample test date & expected/desired results -
How to convert oracle 9i database to mysql using JSP?
Dear friends,
I want to convert oracle 9i database to mysql using JSP technology. Does there anyone who have a hint or some web links about this task? I searched the internet and found all of them are not free and no source code. In fact, what I want to do is really simple, I just want to first, reading the oracle database table structure information and then create the exactly same table in mysql, and then copying all the data in oracle database table to mysql table. But I don�t know how to retrieve the oracle table structure using JDBC. And also I want to retrieve all the tables in the oracle database, so I can choose from them to convert to mysql. It seems that the structure in oracle usually have the tablespace information, I don�t know if I can create database in mysql using this tablespace information. And I don�t know where I can find the information about the functions in JDBC? For example, how to retrieve the table structure? Once I retrieve the table structure and create the exactly same table structure in mysql, then I can fetch all the data in oracle table to mysql table.
Any hint will be great appreciated!
Merry Christmas and Happy new year!
SammyHi, beattris and rtg54,
thank you very much for your great help!
beattris, do you know if there is any such kind of tool free? I am a student and don't want to do commercial product, as you see, my work is very simple, in fact, just as you said, the most important of all is how to get the database structure from oracle schema? do you have any idea about this? or do you know any tool that is open source? so I can learn from it.
rtg54, I just want to convert the database from oracle to mysql, after that, I can use mysql database as storage instead of expensive oracle database. the problem is that I have some data stored in oracle database and the application is built on oracle, after the convertion, I can use mysql to provide data to jsp or servlet application. I will great appreciate if you can contact with mysql about this problem because I don't know how to contact with them.
thanks again and happy new year!
Sammy -
Hi All,
I used BI Publisher conversion utility to convert oracle report 6i to BI Publisher. In the following XML template file i got few quries. I need a hint how can i migrate this report to APEX.
Thanks.
Ribhi
<?xml version="1.0" encoding="UTF-8" ?>
- <dataTemplate name="DbitList" defaultPackage="DbitList" version="1.0">
- <properties>
<property name="xml_tag_case" value="upper" />
</properties>
- <parameters>
<parameter name="USER_LOAN" dataType="character" />
<parameter name="FROM_DATE" dataType="date" defaultValue="20/11/2002" />
<parameter name="TO_DATE" dataType="date" defaultValue="20/11/2002" />
</parameters>
<lexicals />
- <dataQuery>
- <sqlStatement name="Q_1">
- <![CDATA[ SELECT
a.REFERENCE_NUMBER a_refNo,
a.REFERANCE_DATE a_refDate,
rtrim(p.name) p_name,
a.DATE0 a_date,
a.FK_AGREEMENTNUMBER a_loan,
a.FK_AGREEMENTsub_nu a_sub,
DbitList.cf_2formula(:CS_wi_curr, :CS_curr_name, :CS_general) CF_2,
DbitList.cf_rep_descformula(:CS_desc, :CS_desc_wr) CF_rep_desc
FROM
ADVICE_NOTE a,
project p, agreement agr, agreement_transact t
where
agr.number0 = :user_loan and
agr.sub_number <> 'P'
and agr.number0 = t.FK_AGREEMENTNUMBER
and agr.sub_number = t.FK_AGREEMENTsub_nu
and agr.number0 = a.FK_AGREEMENTnumber
and agr.sub_number = a.FK_AGREEMENTsub_nu
and t.FK_ADVICE_NOTEREF0 = a.REFERANCE_DATE
and t.FK_ADVICE_NOTEREFE = a.REFERENCE_number
and t.type = 2
and
agr.fk_projectnumber0 = p.number0
and a.REFERANCE_DATE >= :From_date and
a.REFERANCE_DATE <= :To_date
group by
a.REFERENCE_NUMBER ,
a.REFERANCE_DATE ,
rtrim(p.name) ,
a.DATE0 ,
a.FK_AGREEMENTNUMBER ,
a.FK_AGREEMENTsub_nu
order by
a.REFERENCE_NUMBER ,
a.REFERANCE_DATE ,
rtrim(p.name),
a.DATE0 ,
a.FK_AGREEMENTNUMBER ,
a.FK_AGREEMENTsub_nu
]]>
</sqlStatement>
- <sqlStatement name="Q_2">
- <![CDATA[ SELECT
T.VALUE_DATE t_value_date ,
t.amount t_amount,
wr.serial_number wr_ser_no,
wr.transfer_rate wr_transfer_rate,
rtrim(wr.application_number) wr_app_no,
nvl(rtrim(wr.application_sub_nu), ' ') wr_app_sub,
rtrim(wr.application_type) wr_type,
wr.fk_bank_instrucser WR_BI,
nvl(rtrim(wr.description) ,' ') wr_desc,
t.FK_AGREEMENTNUMBER,
T.FK_AGREEMENTSUB_NU,
t.FK_ADVICE_NOTEREF0 t_ref_date,
t.FK_ADVICE_NOTEREFE t_ref_no,
DbitList.cf_composed_noformula(rtrim ( wr.application_type ), rtrim ( wr.application_number ), nvl ( rtrim ( wr.application_sub_nu ) , ' ' )) CF_composed_no
FROM AGREEMENT_TRANSACT t, withdrawal_request wr
where
t.type = 2 and
t.status = 1
and t.fk_withdrawal_rser = wr.serial_number and t.FK_AGREEMENTNUMBER=:a_loan and T.FK_AGREEMENTSUB_NU=:a_sub and t.FK_ADVICE_NOTEREFE=:a_refNo and t.FK_ADVICE_NOTEREF0=:a_refDate
]]>
</sqlStatement>
- <sqlStatement name="Q_4">
- <![CDATA[ SELECT
wi.FK_WITHDRAWAL_RSER wi_wr_ser,
wi.KD_AMOUNT wi_kd_amt,
wi.amount general_format,
wi.fk_contract_lisfk wi_contract ,
wi.fk_contract_lisser wi_contract_item ,
to_char(wi.AMOUNT,'999,999,999.999') format1,
to_char(wi.AMOUNT,'9,999,999,999.99') format2,
to_char(wi.AMOUNT,'999,999,999,999') format3,
wi.FK_CURRENCYCODE wi_curr,
nvl(wi.FK_AGREEMENT_TOSER,0) wi_ar,
wi.FK_LIST_OF_GOODSER wi_item,
rtrim(c.short_name_e) c_curr,
DbitList.cf_1formula(wi.FK_CURRENCYCODE, to_char ( wi.AMOUNT , '999,999,999.999' ), to_char ( wi.AMOUNT , '999,999,999,999' ), to_char ( wi.AMOUNT , '9,999,999,999.99' )) CF_1
FROM WITHDRAWAL_ITEM wi, currency c
where c.code = wi.fk_currencycode and wi.FK_WITHDRAWAL_RSER=:wr_ser_no
]]>
</sqlStatement>
- <sqlStatement name="Q_5">
- <![CDATA[ select
clgd.number0 itm_txtNo,
clgd.fk_contractserial,
clgd.serial_number
from contract_list_of_g clgd
WHERE clgd.fk_contractserial=:wi_contract and clgd.serial_number=:wi_contract_item
]]>
</sqlStatement>
- <sqlStatement name="Q_3">
- <![CDATA[ SELECT BI.SERIAL_NUMBER BI_SER,
RTRIM(BI.DESCRIPTION) BI_DESC
FROM BANK_INSTRUCTION BI
WHERE BI.SERIAL_NUMBER=:WR_BI
]]>
</sqlStatement>
</dataQuery>
- <dataStructure>
- <group name="G_a_date" dataType="varchar2" source="Q_1">
<element name="p_name" dataType="varchar2" value="P_NAME" />
<element name="a_date" dataType="date" value="A_DATE" />
<element name="a_refNo" dataType="number" value="A_REFNO" />
<element name="a_refDate" dataType="date" value="A_REFDATE" />
<element name="a_loan" dataType="number" value="A_LOAN" />
<element name="a_sub" dataType="varchar2" value="A_SUB" />
<element name="CS_desc" function="first" dataType="varchar2" value="G_VALUE_DATE.CS_BI_DESC" />
<element name="CS_kd" function="sum" dataType="number" value="G_VALUE_DATE.t_amount" />
<element name="CS_general" function="sum" dataType="number" value="G_FK_WITHDRAWAL_RSER1.general_format" />
<element name="CS_wi_curr" function="first" dataType="varchar2" value="G_wi_wr_ser.wi_curr" />
<element name="CS_curr_name" function="first" dataType="varchar2" value="G_wi_wr_ser.c_curr" />
<element name="CS_app_no" function="first" dataType="varchar2" value="G_VALUE_DATE.CF_composed_no" />
<element name="CF_2" dataType="varchar2" value="CF_2" />
<element name="CF_rep_desc" dataType="varchar2" value="CF_rep_desc" />
<element name="CS_desc_wr" function="first" dataType="varchar2" value="G_VALUE_DATE.wr_desc" />
<element name="CS_ITEM" function="first" dataType="varchar2" value="G_wi_wr_ser.CS_itm_text" />
<element name="CS_KD_FIRST" function="first" dataType="varchar2" value="G_wi_wr_ser.CS_itm_kd" />
- <group name="G_VALUE_DATE" dataType="varchar2" source="Q_2">
<element name="WR_BI" dataType="number" value="WR_BI" />
<element name="wr_transfer_rate" dataType="number" value="WR_TRANSFER_RATE" />
<element name="t_amount" dataType="number" value="T_AMOUNT" />
<element name="CS_BI_DESC" function="first" dataType="varchar2" value="G_BI_SER.BI_DESC" />
<element name="wr_desc" dataType="varchar2" value="WR_DESC" />
<element name="wr_app_sub" dataType="varchar2" value="WR_APP_SUB" />
<element name="wr_type" dataType="varchar2" value="WR_TYPE" />
<element name="wr_ser_no" dataType="number" value="WR_SER_NO" />
<element name="WR_NO" dataType="varchar2" value="WR_APP_NO" />
<element name="VALUE_DATE" dataType="date" value="T_VALUE_DATE" />
<element name="FK_AGREEMENTNUMBER" dataType="number" value="FK_AGREEMENTNUMBER" />
<element name="FK_AGREEMENTSUB_NU" dataType="varchar2" value="FK_AGREEMENTSUB_NU" />
<element name="FK_ADVICE_NOTEREF0" dataType="date" value="T_REF_DATE" />
<element name="FK_ADVICE_NOTEREFE" dataType="number" value="T_REF_NO" />
<element name="CF_composed_no" dataType="varchar2" value="CF_composed_no" />
<element name="CS_Ordinary_kd" function="sum" dataType="number" value="G_wi_wr_ser.CS_itm_kd" />
- <group name="G_wi_wr_ser" dataType="varchar2" source="Q_4">
<element name="wi_item" dataType="number" value="WI_ITEM" />
<element name="FK_WITHDRAWAL_RSER1" dataType="number" value="WI_WR_SER" />
<element name="wi_curr" dataType="number" value="WI_CURR" />
<element name="c_curr" dataType="varchar2" value="C_CURR" />
<element name="CS_itm_text" function="first" dataType="varchar2" value="G_fk_contractserial.itm_txtNo1" />
<element name="CS_itm_kd" function="sum" dataType="number" value="G_FK_WITHDRAWAL_RSER1.wi_kd_amt" />
<element name="CS_itm_general" function="sum" dataType="number" value="G_FK_WITHDRAWAL_RSER1.general_format" />
- <group name="G_itm_txtNo" dataType="varchar2" source="Q_4">
<element name="wi_ar" dataType="number" value="WI_AR" />
<element name="wi_contract" dataType="number" value="WI_CONTRACT" />
<element name="wi_contract_item" dataType="number" value="WI_CONTRACT_ITEM" />
- <group name="G_FK_WITHDRAWAL_RSER1" dataType="varchar2" source="Q_4">
<element name="general_format" dataType="number" value="GENERAL_FORMAT" />
<element name="format2" dataType="varchar2" value="FORMAT2" />
<element name="format3" dataType="varchar2" value="FORMAT3" />
<element name="format1" dataType="varchar2" value="FORMAT1" />
<element name="wi_kd_amt" dataType="number" value="WI_KD_AMT" />
<element name="CF_1" dataType="varchar2" value="CF_1" />
</group>
- <group name="G_fk_contractserial" dataType="varchar2" source="Q_5">
<element name="itm_txtNo1" dataType="varchar2" value="ITM_TXTNO" />
<element name="fk_contractserial" dataType="number" value="FK_CONTRACTSERIAL" />
<element name="serial_number" dataType="number" value="SERIAL_NUMBER" />
</group>
</group>
</group>
- <group name="G_BI_SER" dataType="varchar2" source="Q_3">
<element name="BI_SER" dataType="number" value="BI_SER" />
<element name="BI_DESC" dataType="varchar2" value="BI_DESC" />
</group>
</group>
</group>
<element name="CS_1" function="first" dataType="varchar2" value="G_a_date.p_name" />
<element name="CS_rep_kd" function="sum" dataType="number" value="G_a_date.CS_kd" />
</dataStructure>
</dataTemplate>Hi Kesava
Can you check the $APPLCSF/$APPLOUT directory and see if you can see the file and its size? Maybe open it with vi or emacs and goto the last line and see if its complete.
You might also check the OPP log for this request to see if there is anyting in that log?
Regards
Tim
http://blogs.oracle.com/xmlpublisher -
SQL Server Procedures to Oracle Functions
Is there an option in the Migration Assistant 1.2.0 that will convert the SQL Server procedures into Oracle Functions (rather than procedures)?
By default the T/SQL procedures return a integer status code. Our middle-tier requires calls to procedures to return a status code (integer), and I'd like the migration to modify the "procedure" to a "Function returning Integer" rather than Procedure.Thomas,
This is not an option currently. We will look into this for a future release. You could manually make the changes post conversion, prior to generation. As well as adding appropriate RETURN statements, you may want to add additional exception handling so the appropriate error is passed back.
Donal -
Converting Decode function in OBIEE
Hi Guru's
we are converting some BO reports to OBIEE and need to convert Decode function
Below is the Decode function they are using:
Decode ( sign(nvl(BOOKINGS_DATA_UDTC.qty_shipped,0)), 0,decode(BOOKINGS_DATA_UDTC.DELIVERY_NUMBER, 0,decode(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk,to_date('1/1/1990','mm/dd/yyyy'),'Next Month Backlog',decode(sign(nvl(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk, '01-JAN-90') -PAR.PAR_DATE), 1, 'Next Month Backlog', 'Current month will ship')) ,'Awaiting for collection') ,'MTD Shipped')
i have tried converting into case :
case when sign(IFNULL("BOOKINGS_DATA_UDTC"."Qty Shipped",0)) = 0 then (case when "BOOKINGS_DATA_UDTC"."Delivery Number" = 0 then (case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" = '01-JAN-1990' then 'Next Month Backlog' else (case when Timestampdiff(SQL_TSI_DAY, cast('@{ParDate}{28-DEC-2012}' as Date),(case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" IS NULL then CAst('01-JAN-1990' as DATE) else "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" end)) > 1 then 'Next Month Backlog' else 'Current Month Will Ship' end) end) else 'Awaiting For Collection' end) else 'MTD Shipped' end
But it is not workign as expected.
Can some one please help me with this.
Thanks,you can achieve it by using CASE WHEN condition END function in obiee. nested case also supported by obiee.
check the below link Decode Join Condition in OBIEE RPD
Thanks
Jay.
Edited by: Jay on Apr 3, 2012 12:56 PM -
Hi, i want to implement a function in ODI
hi, i am new to odi.
i have created a project in odi which was very simple and only transfers data from one table to another.
but now i want to implement a function in odi. i have the code for that function which is written in pl/sql.
my function accepts some values that are used ahead in the function. now i dont know how to pass the values
so can anyone plz tell me that how to pass values.
regards,
prateek.
Edited by: user11116379 on May 21, 2009 1:37 AMIf you want to call a PL/SQL function, you may want to do this in an ODI procedure. Take a look at the documentation which describes how to call a stored procedure, which is I think going to provide you the ability to execute your function.
Functions can be called as a part of a mapping in an interface in ODI, just as you would normally use it as part of a select or insert statement.
If you want to pass parameters into the execution of a task, you should use ODI's variables. Variables may be passed into the execution of a task, and the values from those variables can be used as a part of a mapping, resource name, filter etc. -
How can i convert oracle report in excel format using 8i
hi,
I want to convert oracle report in excel format using 6i reports. please give the solution with emp table.
millons of thanks in advance.You'll have to use the destype DELIMITEDDATA to render your Report in CSV format. Then set the mime type to Excel. I don't know the exact syntax, so please do a search in metalink for "reports excel" for examples and more info.
Regards,
Martin Malmstrom -
How to convert oracle report in html form into excel form?
Hi friends !! I m trying to convert oracle 10g report into excel form.Its coming in excel form but not with all formats.How to solve the problem?
Hello,
Please give us more information what kind of report(s). Sample example etc.,
Sri -
XML Error while calling webservice from oracle function.
I am getting an error while I am trying to call webservice from oracle function. Any ideas? Thanks.
select get_new_string ('proxy:80', 'http://xxx/PatternVariations/SourceTest/WebMethods','Scott') from dual
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00225: end-element tag "H4" does not match start-element tag "P"
Error at line 9
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at "DORSBP00.DEMO_SOAP", line 82
ORA-06512: at "DORSBP00.GET_NEW_STRING", line 11The error message implies that the web service is returning something that is not well formed xml. Can you verify what is being returned by the web service call
-
I am getting the following Error while trying
to compile the SampleMain.java file(Generating an XML document from a given Employee.dtd).
I have set my classpath to use xmlparser.jar.
D:\XMls>javac SampleMain.java
SampleMain.java:65: Can't convert oracle.xml.parser.DTD to oracle.xml.parser.v2.DTD.
main(java.l
ang.String[]).
generator.generate(dtd, doctype_name);Would you check the java parser version you are using? If using java parser V2, the normal lib name is xmlparserv2.jar.
null -
Can't open oracle functions after installation R12 On windows 2008 64 bit
Hi guys
i am installed oracle R12.1.1 on windows server 2008 R2 64 bit,then the application is opening but all oracle forms functions can't open,the message appear frm-92101 ,i am try the solutions in net but no effect,and i am getting another message from windows that and this appear when try to open another oracle functions
aprogram running on this computer is trying to display a message ,then
message title:
E:\oracle\VIS\apps\tech_st\10.1.3\appsutil\jdk\bin\java "-serv
This problem accours when a program is not fully compatible with windows
This message appear when starting windows also but the java path inside oracle apps files,please help me if oracle r12.1.1 compatible with win 2008 64 bit or not???os :WINDOWS SERVER 2008-32 BIT,explorer: IE 7,
FRM-92101: There was a failure in the Forms Server during startup. This could happened due to invalid configruation. Please look into the web-server log file for details.
Details...
Java Exception:
oracle.forms.net.ConnectionException: Forms session (1) aborted: unable to communicate with runtime process
at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
at oracle.forms.net.HTTPNStream.flush(Unknown Source)
at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
at java.io.DataOutputStream.flush(Unkown Source)
at oracle.forms.net.HTTPConnection.connet(Unknown Source)
at oracle.forms.engine.FormsDispatcher.initConnection(Unknown Source)
at oracle.forms.egnine.FormsDispatcher.init(Unknown Source)
at oracle.forms.egnine.Runform.initConnection(Unknown Source)
at oracle.forms.egnine.Runform.startRunform(Unknown Source)
at oracle.forms.egnine.Main.createRunform(Unknown Source)
at oracle.forms.egnine.Main.start(Unknown Source)
at sun.plugin2Applet.Panel.Plugin2Manager$.AppletExcecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Maybe you are looking for
-
Error while running "Create Application" wizard
Hello, I'm trying to use the "Create Application" wizard (APEX 3.1.0) to generate a report/form application based on a table. When running the last step of the wizard, the process fails with the following info: ORA-20001: Unable to create modules. OR
-
IMac G5 (no iSight) random yet continuous reboots
Hello, I've purchased in 2005 the new iMac G5 through the Apple Store. At first everything was doing great. I was using it only for my personal usage, since I had been given a PC laptop for work. I started using it less & less (no time, too much work
-
Hello, I just downloaded FireFox 8 because I've had enough of IE. Now, when I click on an Excel file in Sharepoint 2010 it opens it directly in Firefox, without the option of download/save. I need to open these files in Excel so I have the analysis a
-
Can't merge 3 selected paths in pathfinder with Illustrator CS4 Mac OSX
I have 3 stroked circles that I would like to merge with pathfinder. Illustrator makes the images dissappear instead of merging them. Is this a bug? Is there a workaround? Thanks Kathleen
-
I just purchased a compaq laptop. I also bought an external hard drive. So I was browsing itunes. I purchased a tv show. I hooked up my ipod. I want to put it on my ipod but it wont let me. So I go to deauthorize and put in the correct information bu