Alternative to Oracle Function

Hi All,
Can I create something similar to an Oracle Function in BI?
In my answer I have two columns. Col1 and Col2
What I am trying to accomplish is something like:
If Col1 = x AND Col2 = y then 'TEST'
ElsIf Col1 = a AND Col2 = b then 'TEST2'
Else 'DEFAULT'
End If
I can use a CASE statement when there is only one column but what if I want to change the display based on two columns?
Is this possible? What would be the best solution ?
Thanks In Advance

Hi Cluess,
Correct me if I'm wrong, you basically want to have a function, let's call it DO_SOMETHING, that takes in column1 and colum2 and gives you a result. And you want to be able to call this function from many places in OBIEE, such as IF DO_SOMETHING(c1,c2) = 'SOME_VALUE' THEN 'DO THIS' ELSE 'DO THAT. And you want to be able to swap out the value of c1 and c2 on the fly with out having to rewrite the CASE statement.
Is that correct? If so, I recommend you that you DO* use a DB function. Then in OBIEE, call your DB Function using EVAlUATE_AGGR. It'll let you call your DB function any time you want in OBIEE and pass in any pair of columns you want to. See this article for how to use it.
Good luck and if you find this post useful, please award points.
Thanks!
-Joe

Similar Messages

  • 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 11

    The 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

  • 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)

  • How to call oracle Function which has If else condition in Data Template

    Hi,
    currently I am working on creating Data Template which uses a Oracle Function which I need to make use in my data template. But I have some confusions on using the same. Could anybody please help me in this regard.
    I have a function like this,
    function invoice_query (p_facility_id facility.facility_id%TYPE,
    p_wave_nbr pick_directive.wave_nbr%TYPE,
    p_container_id unit_pick_group_detail.container_id%TYPE,
    p_distro_nbr unit_pick_group_detail.distro_nbr%TYPE) return invoice_refcur IS
    refcur invoice_refcur;
    begin
    IF p_wave_nbr IS NOT NULL THEN
    OPEN refcur FOR SELECT t1.distro_nbr,
    t1.cust_order_nbr,
    t1.pick_not_before_date,
    SYSDATE,
    t1.ship_address_description,
    t1.ship_address1,
    t1.ship_address2,
    t1.ship_address3,
    t1.ship_address4,
    t1.ship_address5,
    t1.ship_city || ', ' || t1.ship_state || ' ' || t1.ship_zip,
    t1.ship_country_code,
    t1.bill_address_description,
    t1.bill_address1,
    t1.bill_address2,
    t1.bill_address3,
    t1.bill_address4,
    t1.bill_address5,
    t1.bill_city || ', ' || t1.bill_state || ' ' || t1.bill_zip,
    t1.bill_country_code,
    min(t2.pick_order),
    NULL,
    t2.wave_nbr
    FROM stock_order t1,
    pick_directive t2,
    unit_pick_group_detail t3
    WHERE t1.facility_id = t2.facility_id
    AND t1.facility_id = t3.facility_id
    AND t2.facility_id = t3.facility_id
    AND t1.distro_nbr = t2.distro_nbr
    AND t1.distro_nbr = t3.distro_nbr
    AND t2.distro_nbr = t3.distro_nbr
    AND t1.facility_id = p_facility_id
    AND t2.wave_nbr = p_wave_nbr
    AND g_scp(p_facility_id, 'interface_tcp_flag') = 'N'
    AND t2.pick_type = 'U'
    AND t3.group_id in (SELECT t4.group_id
    FROM unit_pick_group t4
    WHERE t4.facility_id = p_facility_id
    AND t4.wave_nbr = p_wave_nbr)
    GROUP BY t1.distro_nbr,
    t1.cust_order_nbr,
    t1.pick_not_before_date,
    t1.ship_address_description,
    t1.ship_address1,
    t1.ship_address2,
    t1.ship_address3,
    t1.ship_address4,
    t1.ship_address5,
    t1.ship_city || ', ' || t1.ship_state || ' ' || t1.ship_zip,
    t1.ship_country_code,
    t1.bill_address_description,
    t1.bill_address1,
    t1.bill_address2,
    t1.bill_address3,
    t1.bill_address4,
    t1.bill_address5,
    t1.bill_city || ', ' || t1.bill_state || ' ' || t1.bill_zip,
    t1.bill_country_code,
    t2.wave_nbr
    ORDER BY MIN(t3.group_id), MAX(t3.slot);
    elsif p_container_id is not null then
    OPEN refcur FOR SELECT distinct t1.distro_nbr,
    t1.cust_order_nbr,
    t1.pick_not_before_date,
    SYSDATE,
    t1.ship_address_description,
    t1.ship_address1,
    t1.ship_address2,
    t1.ship_address3,
    t1.ship_address4,
    t1.ship_address5,
    t1.ship_city || ', ' || t1.ship_state || ' ' || t1.ship_zip,
    t1.ship_country_code,
    t1.bill_address_description,
    t1.bill_address1,
    t1.bill_address2,
    t1.bill_address3,
    t1.bill_address4,
    t1.bill_address5,
    t1.bill_city || ', ' || t1.bill_state || ' ' || t1.bill_zip,
    t1.bill_country_code,
    NULL,
    t2.dest_id,
    null
    FROM stock_order t1,
    unit_pick_group_detail t2
    WHERE t1.facility_id = t2.facility_id
    and t1.distro_nbr = t2.distro_nbr
    and t1.facility_id = p_facility_id
    AND g_scp(p_facility_id, 'interface_tcp_flag') = 'N'
    AND t2.container_id = p_container_id;
    else
    open refcur for SELECT distinct t1.distro_nbr,
    t1.cust_order_nbr,
    t1.pick_not_before_date,
    SYSDATE,
    t1.ship_address_description,
    t1.ship_address1,
    t1.ship_address2,
    t1.ship_address3,
    t1.ship_address4,
    t1.ship_address5,
    t1.ship_city || ', ' || t1.ship_state || ' ' || t1.ship_zip,
    t1.ship_country_code,
    t1.bill_address_description,
    t1.bill_address1,
    t1.bill_address2,
    t1.bill_address3,
    t1.bill_address4,
    t1.bill_address5,
    t1.bill_city || ', ' || t1.bill_state || ' ' || t1.bill_zip,
    t1.bill_country_code,
    NULL,
    NULL,
    t3.wave_nbr
    FROM stock_order t1,
    unit_pick_group_detail t2,
    unit_pick_group t3
    WHERE t1.facility_id = t2.facility_id
    and t2.facility_id = t3.facility_id
    and t1.distro_nbr = t2.distro_nbr
    and t2.group_id = t3.group_id
    and t1.facility_id = p_facility_id
    AND g_scp(p_facility_id, 'interface_tcp_flag') = 'N'
    AND t2.distro_nbr = p_distro_nbr;
    END IF;
    return refcur;
    end;
    I have created data template like following,
    <sqlStatement name="Q_INVOICE">
                   <![CDATA[
              SELECT Pack_Slip_R.invoice_query(:P_FACILITY_ID,:P_WAVE_NBR,:P_CONTAINER_ID,:P_DISTRO_NBR) from dual
                                                     ]]>
    </sqlStatement>
    But how does I create a element for the "t1.ship_city || ', ' || t1.ship_state || ' ' || t1.ship_zip" column in the oracle function. I normally create an element like following,
    <group name="G_INVOICE" source="Q_INVOICE">
                   <element name="CUST_ORDER_NBR" value="cust_order_nbr"/>
                   <element name=":dest_id" value="dest_id"/>
    </Group>
    But how do i create element if a column name is kind of dynamic. Please help. I cannot Rename/change the Column in SQL Query. Please let me know If I could handle this whole logic in BI Publsiher.
    Regards,
    Ashoka BL

    try useing alias
    t1.ship_city || ', ' || t1.ship_state || ' ' || t1.ship_zip as <COLUMN_ALIAS>

  • Calling oracle function in OMB script

    Hi
    Can anyone please tell me how can i get the returned value of an oracle function in OMB script. or how can i get the value into OMB variable and use it.
    Basically i want to set the properties of OWB mapping via OMB script.
    Following OMB code sets the max error limit of a mapping.
    OMBALTER MAPPING 'MAP_DATA' SET PROPERTIES (MAXIMUM_NUMBER_OF_ERRORS) VALUES ('100')
    i dont want to hard code the value 100 rather i want this value to be returned from a function.
    If it is not possible then plz tell me how can i set MAXIMUM_NUMBER_OF_ERRORS property of OWB mapping via sql or pl/sql.
    Any type of clue will be highly appreciated.
    Best Regards

    Here is my bare-bones OMB SQL Library to allow you to do pure SQL calls from within OMB+. All I have ever used it for is to run queries, so I don't have a library procedure for calling a function, however if your function is SQL-callable (e.g. select my_func() from dual) then it would work. Either that or you'll want to augment this library to build a procedure that will call and return the results from a java preparedStatement. It's something I've been meaning to do, but haven't got around to it yet.
    All you should need to do is save this as it's own tcl file and then source it at the top of your own script, or embed it into your script.
    EDIT: Here is a page with some sample code on using java.sql.CallableStatement to call a Pl/SQL procedure from Java which should certainly do the trick for you in conjunction with the basic session control in my library.
    http://www.exampledepot.com/egs/java.sql/CallProcedure.html
    Cheers,
    Mike
    package require java
    #file omb_sql_library.tcl
    proc oracleConnect { serverName databaseName portNumber username password } {
       # import required classes
       java::import java.sql.Connection
       java::import java.sql.DriverManager
       java::import java.sql.ResultSet
       java::import java.sql.SQLWarning
       java::import java.sql.Statement
       java::import java.sql.CallableStatement
       java::import java.sql.ResultSetMetaData
       java::import java.sql.DatabaseMetaData
       java::import java.sql.Types
       java::import oracle.jdbc.OracleDatabaseMetaData
       # load database driver .
       java::call Class forName oracle.jdbc.OracleDriver
       # set the connection url.
       append url jdbc:oracle:thin
       append url :
       append url $username
       append url /
       append url $password
       append url "@"
       append url $serverName
       append url :
       append url $portNumber
       append url :
       append url $databaseName
       set oraConnection [ java::call DriverManager getConnection $url ]
       set oraDatabaseMetaData [ $oraConnection getMetaData ]
       set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
       puts "Connected to: $url"
       puts "$oraDatabaseVersion"
       return $oraConnection
    proc oracleDisconnect { oraConnect } {
      $oraConnect close
    proc oraJDBCType { oraType } {
      #translation of JDBC types as defined in XOPEN interface
      set rv "NUMBER"
      switch $oraType {
         "0" {set rv "NULL"}
         "1" {set rv "CHAR"}
         "2" {set rv "NUMBER"}
         "3" {set rv "DECIMAL"}
         "4" {set rv "INTEGER"}
         "5" {set rv "SMALLINT"}
         "6" {set rv "FLOAT"}
         "7" {set rv "REAL"}
         "8" {set rv "DOUBLE"}
         "12" {set rv "VARCHAR"}
         "16" {set rv "BOOLEAN"}
         "91" {set rv "DATE"}
         "92" {set rv "TIME"}
         "93" {set rv "TIMESTAMP"}
         default {set rv "OBJECT"}
      return $rv
    proc oracleQuery { oraConnect oraQuery } {
       set oraStatement [ $oraConnect createStatement ]
       set oraResults [ $oraStatement executeQuery $oraQuery ]
       # The following metadata dump is not required, but will be a helpfull sort of thing
       # if ever want to really build an abstraction layer
       set oraResultsMetaData [ $oraResults getMetaData ]
       set columnCount        [ $oraResultsMetaData getColumnCount ]
       set i 1
       #puts "ResultSet Metadata:"
       while { $i <= $columnCount} {
          set fname [ $oraResultsMetaData getColumnName $i]
          set ftype [oraJDBCType [ $oraResultsMetaData getColumnType $i]]
          #puts "Output Field $i Name: $fname Type: $ftype"
          incr i
       # end of metadata dump
       return $oraResults
    # SAMPLE CODE to run a quick query and dump the results. #
    #set oraConn [ oracleConnect myserver orcl 1555 scott tiger ]
    #set oraRs [ oracleQuery $oraConn "select name, count(*) numlines from user_source group by name" ]
    #for each row in the result set
    #while {[$oraRs next]} {
      #grab the field values
    #  set procName [$oraRs getString name]
    #  set procCount [$oraRs getInt numlines]
    #  puts "Program unit $procName comprises $procCount lines"
    #$oraRs close
    #oracleDisconnect $oraConnEdited by: zeppo on Nov 25, 2008 7:19 AM

  • Order by clause  Dynamic in Oracle function

    How can i get order by Clause Dynamic in Oracle function
    My function Returns sql query with SYS_REFCURSOR . and i will pass the order by column as input parameter
      create or replace
    FUNCTION TEST_SSK
            p_srot  number
    RETURN SYS_REFCURSOR
    AS
    C_testssk SYS_REFCURSOR;
    BEGIN
    OPEN C_TESTSSK FOR
    SELECT LOAN_CODE,LOAN_DATE,DUE_DATE,LOAN_AMT FROM LOAN_MASTER
    order by P_SROT;
    return C_testssk;
    end;Edited by: user10736825 on Dec 22, 2010 11:34 AM

    you can go for a dynamic query ;)
    create or replace
    FUNCTION TEST_SSK
            p_srot  number
    RETURN SYS_REFCURSOR
    AS
    C_testssk SYS_REFCURSOR;
    l_str VARCHAR2(4000);
    l_order VARCHAR2(100);
    BEGIN
    l_str := 'SELECT LOAN_CODE,LOAN_DATE,DUE_DATE,LOAN_AMT FROM LOAN_MASTER ';
    IF p_sort = 'LC'
    THEN
      l_order := ' ORDER BY LOAN_CODE ';
    ELSIF p_sort = 'LD'
    THEN
      l_order := ' ORDER BY LOAN_DATE ';
    END IF;
      l_str := l_str || l_order ;
    OPEN C_TESTSSK FOR l_str;
    return C_testssk;
    end;

  • Using oracle function in order by clause

    Hello,
    can i use report query or report that generate query like this :
    select fname, lname from peoples order by dbms_random.value;
    dbms_random is an oracle function to generate random value.
    Thnaks

    add the following call to your query:
    query.addOrdering(query.getExpressionBuilder().getFunction("dbms_random.value"));
    --Gordon                                                                                                                                                                                                                                                                       

  • How to set Oracle function as a PreparedStatement parameter?

    Hi all,
    I was wondering if it is possible to use Oracle function as a PreparedStatement parameter? For example:
    PreparedStatement pstmt = new PreparedStatement("update table set date=? where ...");
    pstmt.set???(1, sysdate);I can put the function in the sql directly of course, but the parameter is depending on some condition. Any idea is greatly appreciated.
    Joey

    First, sysdate isn't a function, it's really a pseudo-value.
    Second, it doesn't exist on the Java side, therefore it can't be bound via a set statement.
    The correct and standard way is to put it in the SQL; if the use of sysdate is conditional, you can:
    1) embed the conditionality in the SQL, e.g.:
    PreparedStatement pstmt = new PreparedStatement("update table set date= decode( ?, 0, ?, 1, sysdate, sysdate) where ...");2) for more complex conditionality, define a custom function and embed that in your SQL
    3) do it on the Java side and use more than one preparedstatement

  • How to use oracle functions in Crystal Reports XI using Oracle Server

    Hi all,
    Is it possible  to use oracle functions in Crystal Reports XI using Oracle Server as Data Source.
    If i try to use a procedure,i am getting error with message "Invalid Arguement Provided".
    Functions are not visible objects like tables,views and stored procedures.
    The  jdbs driver i m using is oracle.jdbc.driver.OracleDriver.

    I think it is not possible to add functions in crystal directly for any database. You need to use those functions in a stored procedure and add that storedprocedure as a datasource.
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233353335333833323333%7D.do]
    regards,
    Raghavendra

  • I can't execute oracle functions with c#.  i'm using oracle 9i version.

    i have a problem trying to execute an oracle function with c#.net. The Oracle version i'm using is Oracle 9i.
    This is the function definition: (it's defined and working right because i have tryed it with SQLWorksheet)
    CREATE OR REPLACE Function NRegistros return integer is
    Numero integer(4);
    begin
    select count(*) into Numero from singles;
    return Numero;
    END NRegistros;
    But with c#.Net i can't acces it because i get an error: "this is not a procedure or is not defined". And i think the code is right. In fact in the same code you can see that i'm using an stored procedure and i have not problems. But with the function i have problems. Is it possible that "OracleClient" can't work with Oracle9i functions??. This is the code:
    OracleParameter Parametro = new OracleParameter("Name", OracleType.VarChar,10);
    OracleParameter ParametroFuncion = new OracleParameter("Retorno", OracleType.Int32, 4);
    Parametro.Direction = ParameterDirection.Output;
    ParametroFuncion.Direction = ParameterDirection.ReturnValue;
    OracleConnection Conexion = new OracleConnection("Data Source=DISCOS;User Id=SYSTEM;Password=a0000;");
    Conexion.Open();
    OracleCommand Todos = new OracleCommand();
    OracleCommand Procedimiento = new OracleCommand();
    OracleCommand Funcion = new OracleCommand();
    Todos.Connection = Conexion;
    Todos.CommandType = CommandType.Text;
    Todos.CommandText="select * from singles";
    Procedimiento.Connection = Conexion;
    Procedimiento.CommandType = CommandType.StoredProcedure;
    Procedimiento.CommandText = "Procedimiento";
    Procedimiento.Parameters.Add(Parametro);
    Funcion.Connection = Conexion;
    Funcion.CommandType = CommandType.StoredProcedure;
    Funcion.CommandText = "NRegistros";
    OracleDataReader Lector = Todos.ExecuteReader();
    BindingSource Discos = new BindingSource();
    Discos.DataSource = Lector;
    dgvSingles.DataSource = Discos;
    Procedimiento.ExecuteNonQuery();
    Funcion.ExecuteNonQuery();
    lblRegistroProcedimiento.Text = Procedimiento.Parameters["Name"].Value.ToString();
    lblNregistros.Text=Funcion.Parameters["Retorno"].Value.ToString();
    Conexion.Close();
    Edited by: user11921281 on 22-nov-2009 20:32

    thank you very much. It was a stupid error, sorry. There was one line left :
    OracleParameter Parametro = new OracleParameter("Name", OracleType.VarChar,10);
    OracleParameter ParametroFuncion = new OracleParameter("Retorno", OracleType.Int32, 4);
    Parametro.Direction = ParameterDirection.Output;
    ParametroFuncion.Direction = ParameterDirection.ReturnValue;
    OracleConnection Conexion = new OracleConnection("Data Source=DISCOS;User Id=SYSTEM;Password=a0000;");
    Conexion.Open();
    OracleCommand Todos = new OracleCommand();
    OracleCommand Procedimiento = new OracleCommand();
    OracleCommand Funcion = new OracleCommand();
    Todos.Connection = Conexion;
    Todos.CommandType = CommandType.Text;
    Todos.CommandText="select * from singles";
    Procedimiento.Connection = Conexion;
    Procedimiento.CommandType = CommandType.StoredProcedure;
    Procedimiento.CommandText = "Procedimiento";
    Procedimiento.Parameters.Add(Parametro);
    Funcion.Connection = Conexion;
    Funcion.CommandType = CommandType.StoredProcedure;
    Funcion.CommandText = "NRegistros";
    Funcion.Parameters.Add(ParametroFuncion); //<--------------------- That one !!! (yes it was a stupid error jeje)
    OracleDataReader Lector = Todos.ExecuteReader();
    BindingSource Discos = new BindingSource();
    Discos.DataSource = Lector;
    dgvSingles.DataSource = Discos;
    Procedimiento.ExecuteNonQuery();
    Funcion.ExecuteNonQuery();
    lblRegistroProcedimiento.Text = Procedimiento.Parameters["Name"].Value.ToString();
    lblNregistros.Text=Funcion.Parameters["Retorno"].Value.ToString();
    Conexion.Close();

  • Oracle Function call from JDBC Adapter

    Hi,
      Is it possible to call Custom Oracle Function from JDBC Adapter? 
    I know we can call stored procedure but I need to call Oracle function. Please explain how?
    Regards,
    Shweta.

    You'll need to provide a column alias for the function call:
    select func(val) as alias from dual

  • Call oracle function in ODI

    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
    Regards

    I 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

  • Alternative for STRING_CENTER function module

    Hi,
    Can any one give me the Alternative for STRING_CENTER function module.
    it is there in 4.7 when i am using the same  in ecc 6.0 it is giving as absolute statement .
    Please give the solution for this.

    Hi,
      C147_STRING_SPLIT_AT_POSITION
    STRING_SPLIT
    STRING_SPLIT_AT_POSITION
    check this sample code
    DATA: text(10) TYPE c VALUE '0123456789',
    text1(6) TYPE c,
    text2(6) TYPE c.
    PARAMETERS position TYPE i.
    CALL FUNCTION 'STRING_SPLIT_AT_POSITION'
    EXPORTING
    string = text
    pos = position
    IMPORTING
    string1 = text1
    string2 = text2
    EXCEPTIONS
    string1_too_small = 1
    string2_too_small = 2
    pos_not_valid = 3
    OTHERS = 4.
    Regards

  • Using nested select in oracle functions

    hi, im new to oracle functions, and im trying to write a function using a nested select statment, but i get the error
    Error: PLS-00428: an INTO clause is expected in this SELECT statement
    can anyone help point out what i am doing wrong, The sql select statment works on a worksheet, so i guess its the way i am using the function
    create or replace function Media_Object_Name(Detail_id Number) return varchar2 as
    Result varchar2(300);
    begin
    select promo_name from promo where promo_id =
    (select promo_id from promo_plan where promo_plan_id =
    (select promo_plan_id from event_promotion where detail_id = Detail_id)) into ;
    return(Result);
    end Media_Object_Name;
    thanks
    james

    The into clause should go here:
    SELECT promo_name
      INTO Result
      FROM promo
    WHERE promo_id = (SELECT promo_id
                         FROM promo_plan
                        WHERE promo_plan_id = (SELECT promo_plan_id
                                                 FROM event_promotion
                                                WHERE detail_id = detail_id));I don't know about your data modell, but are you sure you need nested selects?
    C.

  • Oracle functions with PowerPivot

    Hi All,
    I have a requirement of building reports using Oracle functions in PowerPivot.
    I have tried using Table Import Wizard and Command Type=StoredProcedure in th ePowerPivot.
    Any help will be appreciated.
    Thanks and Regards,
    SS

    Hello,
    I don't think we can use Oracle functions/stored procedures in PowerPivot, please see the similar thread below:
    http://social.technet.microsoft.com/Forums/en-US/22e67f7f-0753-4f21-bae2-1812d2daf03e/powerpivot-oracle-stored-procedure-err-the-sql-statement-is-not-valid-there-are-no-columns?forum=sqlkjpowerpivotforexcel
    I would suggest you elaborate your requirement with more detail.  
    Regards,
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • Problem to analyse mapping error

    Hi all, I have a problem to analyse a BPM mapping error on PI7.1. The szenario is as follows: I have 3 different containers (Abstract Interfaces) which data is used to determine the content of a  result container. E.g: ABSTRACT_INTERFACE_1 ABSTRACT_I

  • How to raise an event from a program

    Hi, I am creating a workflow for HR, the person will request a basic pay change than, this will start the workflow. For this i am making a screen from where i need to triger the event for the workflow. Does anybody has any idea? of how to raise an ev

  • Report for Unrealized/Realized Foreign Exchange Payments and Receipts

    Is there a report in SAP that shows unrealized/realized foreign exchange cash receipts and payments. if yes, what is that report. Please provide transaction code. If not, do we need to create ABAP query. How do we create that Query in this regard. Wh

  • Equipment master data : address in "Location" tab

    Hi experts, Can someone tell me what the "address" data (in equipment master data, "Location" tab) are for? What is an example of business case which will use that "address"? Thanks, P.

  • Kernel panic sometime after 10.4.9 software-updated, SMB?

    Apparently samba-networking related - makes sense: it happened as I saved a BBEdit file to an already-SMB-mounted Window2000 server volume (across wired ethernet). Earlier I'd rebooted a couple of times after the update (once then it asked me to, a s