Conditional Flow using ODI Procedures

Hello Experts,
I want to implement if else conditional flow in my ODI procedure. Is it possible to implement this?
Please help. Thanks in Advance
-- Harshad

HI,
In the ODI page there is a pdf called: oracledi_km_development.pdf
This manual can tell you a lot about those commands.
Please, remember to check any questio that was helpful or correct in the post, and to close the post when you think your problem is solved. That will help other users with the same problem.
Cezar Santos
[www.odiexperts.com]

Similar Messages

  • How to read I$ table using ODI procedure

    Hi
    Can any one help me how to drop a I$ table from out sie of interface.
    I have tried below approches but no luck
    I have created ODI procedure with technology oracle and target logical schema (I$ tables are creating on target DB) with and with out begin and end;
    Approch 1:
    Given below code in ODi procedure
    drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> <% if (new Integer(odiRef.getOption( "COMPATIBLE" )).intValue() >= 10 ) { out.print( "purge" ); }; %>
    Approch 2:
    drop table I$_<%=odiRef.getTable("L", "TARG_NAME", "A") %>;
    Approch 3:
    drop table <%=odiRef.getTable("L", "INT_NAME", "W")%> (but it is fetching target dtabase schema anme not I$ table)
    Please help me any other alternative way to drop a I$ table, more over this code should be unique for all interface
    Regards,
    Phanikanth

    Thanks bhabani,
    Actaul my requirement is some time my scenario is stoping due some issue at Merge Rows Step (I am using IKM Oracle Incremental Update(Merge) KM) when the next iteration starts it is thwoing and error at create flow table I$ step and error is table name is already exists, so i am doing is if the interface went failed I am storing those information in one table using ODI procedure (INF--ko-->ODI procedure) in same ODI procedure I want to call a I$ table to drop.
    Can you please provide the steps so it will very useful for me using Java variable.
    I have gievn a step as below on create I$ table step (after create I$ statement)
    <@ java.lang.String Idollertable = <%=odiRef.getTable("L", "INT_NAME", "W")%> ; @>
    I am calling Idollertable variable in ODI procedure which is ko>* of INF as <@=Idollertable@>
    Note: I have followed below approch
    ODI Procedure Code:
    drop table <@=Idollertable@>; --> *2nd approch*
    begin
    insert into ODI_EXECUTION_ERROR_DETAILS
    (SESSION_NO,
    SCENARIO_NAME,
    CONTEXT_NAME,
    ERR_MESSAGE,
    INSERT_COUNT,
    ERROR_COUNT)
    values
    <%=snpRef.getSession("SESS_NO")%>,
    '<%=odiRef.getPrevStepLog("STEP_NAME")%>',
    '<%=odiRef.getContext( "CTX_NAME" )%>',
    '<%=odiRef.getPrevStepLog("MESSAGE")%>',
    '<%=odiRef.getPrevStepLog("INSERT_COUNT")%>',
    '<%=odiRef.getPrevStepLog("ERROR_COUNT")%>'
    commit;
    drop table <@=Idollertable@>; --> * first approch *
    end;
    Please help me
    Regards,
    Phanikanth
    Edited by: Phanikanth on Mar 3, 2013 9:52 PM
    Edited by: Phanikanth on Mar 3, 2013 9:52 PM

  • How to assign a value to ODI Variable using ODI Procedure

    Hi ,
    Is it possible to assign a value to a ODI Variable using ODI Procedure ?
    If it is possible how we can do that.
    BEGIN
    IF #Counter=1
    Then
    #Next_Increment:=#Counter+1;
    End if;
    END;
    In my example I have 2 ODI Variables #counter and #Next_increment.
    I am trying to assign VALUE TO A ODI VARIABLE #next_increment from another ODI Variable #counter.
    thanks
    prasanna

    Prasanna,
    I have a similar requirement where I need to assign values to ODI variables within a procedure. How do we make use of an ODI package to accomplish this ?
    Actually, I have a sequence of ODI steps, and there is a call to a procedure 'LOG ERROR' from every step which gets called in case error occurs in any step. I just need to identify from which step the error came.
    Please help.

  • Call a Stored Procedure that returns a REFCURSOR using ODI Procedure

    Hi,
    I have a scenario wherein the stored procedure (TEST_PROC1) that returns a REFCURSOR. The second procedure(TEST_PROC2) will use the REFCURSOR as inpuut and insert it to a table.
    Now, I need to execute the test procedures (TEST_PROC1 and TEST_PROC2) using the ODI Procedure but I always get error. However, I was able to execute the test procedures using sqlplus. Here is the command I used for sqlplus:
                   var rc refcursor
                   exec TEST_PROC1(:rc);
                   exec TEST_PROC2(:rc);
    PL/SQL Stored Procedure:
    -- TEST_PROC1 --
    create or replace
    PROCEDURE TEST_PROC1 (p_cursor IN OUT SYS_REFCURSOR)
    AS
    BEGIN
    OPEN p_cursor FOR
    SELECT *
    FROM test_table1;
    END;
    -- TEST_PROC2 --
    create or replace
    procedure TEST_PROC2( rc in out sys_refcursor ) is
    FETCH_LIMIT constant integer := 100;
    type TFetchBuffer is table of test_table2%RowType;
    buffer TFetchBuffer;
    begin
    loop
    fetch rc bulk collect into buffer limit FETCH_LIMIT;
    forall i in 1..buffer.Count
    insert into test_table2(
    c1, c2
    ) values(
    buffer(i).c1, buffer(i).c2
    exit when rc%NotFound;
    end loop;
    end;
    Is there a way to call a PL/SQL Stored Procedure that returns a REFCURSOR using ODI Procedure?
    Thanks,
    Cathy

    Thanks for the reply actdi.
    The procedure TEST_PROC1 is just a sample procedure. The requirement is that I need to call a stored procedure that returns a cursor using ODI and fetch the data and insert into a table, which in this case is test_table2.
    I was able to execute a simple SQL procedure (without cursor) using ODI procedure. But when i try to execute the SQL procedure with cursor in ODI, I encountered error.
    Do you have any idea how to do this?

  • Table to File using ODI Procedure

    Pls help me ...describing what are the steps in ODI need for loading a RDBMS table to File using ODI Procedure....not using Interface and OdiSqlUnload
    Thanks in Advance

    You can use Java Beanshell or Jython to load data in to a file. The only thing is that you need to create a connection so that you can run the select query and get the resultset. Now write it using your rest code.
    If i would have been in your situtation i would prefer Java Beanshell ( not good in jython ;) . Dev can help you on this.). The readymade query is already here
    http://odiexperts.com/generate-column_name-header-for-odisqlunload/
    Thanks.

  • How to use ODI procedures into a ODI variable

    Hi,
    I have the below condition
    select c1 from table where c1>#ODIVAR1 and use the output of this query in a variable to define the package flow
    If output=0 package flow goes as XXX
    else
    flow goes as YYY.
    So please suggest how to use a ODI variable to capture the procedures putput and use it in package flow in this case.
    Thanks,
    Naveen.

    Step1 . Refresh the variable in the package, which have this query select c1 from table where c1>#ODIVAR1
    Step2. Evaluate above variable (operator = , value 0 )
    Step 3. If true Package flow xxx , else false yyy
    Please close the thread once you get the required flow.

  • ODI Procedure - updting the source table

    Hi,
    I need to call a PL/SQL package via ODI. I used ODI procedure to do the task.
    In source tab - select empid from employee
    In target tab -
    decalre
    ab varchar2(25);
    begin
    pack1.proced1(:empid,ab);
    update success1 set val1 = ab where empid = *:empid;*
    commit;
    end;
    But when i execute the procedure, its giving the error as missing parameter empid. It could not recognise the bolded part. When i give the direct value in the cmd,
    update success1 set val1 = ab where empid = *101;* its working fine.
    Any idea to resove this issue.
    Thanks in Advance,
    Ram Mohan T

    Vijay,
    1. Do you expect a single record to be returned by your source query?
    No. My source query returns with multiple records.
    2. What is the signature of your procedure? Does it accept a list of Id's or a single number.
    My procedure accepts only one id at a time. After that is processed, the next id will be passed to the procedure.
    Vijay, one thing i am confused is when I use a insert statement after the procedure its working fine (insert into success1 values(:empid,ab)).
    When i use the update stmt without where condition after the procedure also working fine (update success1 set empid1 = :empid).
    But when i use the where condition, update success1 set empid1 = ab where empid1=:empid its not working fine. Error is "Missing Parameter empid"
    Thanks in Advance,
    Ram Mohan T

  • Help using oracle syntax "SUM(col1) over (order by col2)" using ODI

    Hi all
    I want to load data from oracle to ESSBASE using ODI, and I know oracle have such syntax sum(col1) over (order by col2,col3) which can get the accumulation data, e.g
    Oracle data table
    col1, col2, value
    A 2009-1 10
    A 2009-2 10
    A 2009-3 10
    And the essbase need
    col1 col2 value
    A 2009-1 10
    A 2009-2 20
    A 2009-3 30
    However after i try this in ODI, error occur:
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    File "<string>", line 32, in ?
    java.sql.SQLException: ORA-00979: not a GROUP BY expression
    and the original generated SQl by ODI :
    select 'HSP_InputValue' "HSP_Rates",MAP_KMDZ_TABLE.BUD_DYKM "Account",MAP_MONTH.ESS_MONTH "Period",MAP_YEAR.ESS_YEAR "Year",'Actual' "Scenario",'Draft' "Version",TEMP_LIRUN.CURRENCY "Currency",MAP_COMPANYCODE.ESS_COMPCODE "Entity",substr(MAP_KMDZ_TABLE.BUD_BUSINESSOBJECT,1,80) "BusinessObject",'Route_NoRoute' "Route",MAP_TRANSPORT.ESS_TRANSPORT "Transport",substr(MAP_KMDZ_TABLE.BUD_BUSINESSACTIVITY,1,80) "BusinessActivity",substr(MAP_KMDZ_TABLE.BUD_CHANNEL,1,80) "Source",'NoCounterparty' "Counterparty",sum(TEMP_LIRUN.DATAVALUE) over (order by MAP_KMDZ_TABLE.BUD_DYKM,MAP_YEAR.ESS_YEAR,MAP_MONTH.ESS_MONTH,TEMP_LIRUN.CURRENCY,MAP_COMPANYCODE.ESS_COMPCODE,MAP_TRANSPORT.ESS_TRANSPORT,MAP_KMDZ_TABLE.BUD_BUSINESSACTIVITY,MAP_KMDZ_TABLE.BUD_BUSINESSOBJECT,MAP_KMDZ_TABLE.BUD_CHANNEL) "Data" from ETL_DEV.TEMP_LIRUN TEMP_LIRUN, ETL_DEV.MAP_KMDZ_TABLE MAP_KMDZ_TABLE, ETL_DEV.MAP_MONTH MAP_MONTH, ETL_DEV.MAP_YEAR MAP_YEAR, ETL_DEV.MAP_COMPANYCODE MAP_COMPANYCODE, ETL_DEV.MAP_TRANSPORT MAP_TRANSPORT where      (1=1) And (TEMP_LIRUN.COSTELMNT=MAP_KMDZ_TABLE.SAP_ZZKM)
    AND (TEMP_LIRUN.FISCYEAR=MAP_YEAR.SAP_YEAR)
    AND (TEMP_LIRUN.FISCPER3=MAP_MONTH.SAP_MONTH)
    AND (TEMP_LIRUN.COMP_CODE=MAP_COMPANYCODE.SAP_COMPCODE)
    AND (TEMP_LIRUN.WWHC=MAP_TRANSPORT.SAP_WWHC) Group By MAP_KMDZ_TABLE.BUD_DYKM,
    MAP_MONTH.ESS_MONTH,
    MAP_YEAR.ESS_YEAR,
    TEMP_LIRUN.CURRENCY,
    MAP_COMPANYCODE.ESS_COMPCODE,
    substr(MAP_KMDZ_TABLE.BUD_BUSINESSOBJECT,1,80),
    MAP_TRANSPORT.ESS_TRANSPORT,
    substr(MAP_KMDZ_TABLE.BUD_BUSINESSACTIVITY,1,80),
    substr(MAP_KMDZ_TABLE.BUD_CHANNEL,1,80)
    I know ODI think sum.. over must append group by , however it's not! How to solve this problem.
    Thank All for your attention
    SOS!
    Ethan

    Hi Ethan,
    In my exeprnc I faced a similar kind of situation.
    Two work arounds.
    1. Write one procedure and execute the same using ODI procedure.
    2. Customize a Km and use that KM in your interface.
    I guess in your query Group by function is not needed. (if this is the case you can achive this by a smple customization step in KM)
    for example : your current KM will generate a query like this:-
    select x,y, sum(x) over (order by y) as sumx FROM TestTable group by x, y
    and you need a query like this
    select x,y, sum(x) over (order by y) as sumx FROM TestTable
    go to your KM (duplicate the KM which you are using and rename _withoutGroup )
    remove the group by function from select query
    (remove the API function <%=snpRef.getGrpBy()%> from insert into i$ table step)
    please let me know if you need more help on this
    regards,
    Rathish

  • How to use Update Statement in ODI Procedure

    Hi,
    How can I use an update statement inside an ODI procedure.
    Thanks

    Hi,
    You do not need the BEGIN and END. ODI procedures are free text, so you can simply write your update statement, as you would in toad/sql developer etc etc. Just make sure you set the Technology and the logical schema. It is how ever best practice to also use the API:
    <%=odiRef.getSchemaName("YOUR_LOGICAL_SCHEMA_NAME", "D")%>. to prefix tables. This way, you select data from different schema's in the same instance (as long a your user has the correct privs).
    Cheers
    Bos
    Edited by: Bos on Jun 22, 2011 3:09 PM

  • Printing messages through ODI procedure using Javashell bean

    I am new to this ODI procedure using Javashell bean.
    As i know some basics in Java ,i am trying this following code through ODI.
    I wanted to print messages using the code System.out.println("Welcome");
    But where we can see the output for this code in ODI?
    If any on knows ,kindly let me how do i can go about this?

    if you run an agent from the command line and you are executing your procedure using this agent then  the output will be reported in the dos/cmd window.

  • ODI Procedure: Using Variable Logical Schema

    Hi!
    i wrote a PL\SQL procedure inside an odi procedure, using options, variables etc.
    now we need to execute the procedure in different logical schemas.
    We've at least 20 different logical schemas and to semplify the maintenance we'd like to pass the logical schema as an Option or something similar,
    is it possibile to do this with a procedure?
    The version of ODI is 11.1.1.5.0 and the targets are only Oracle DB.

    I've got a question : are all you schema in the same server (database) ?
    If so, you can LIST the schemas with a SQL Statement in the "command as SOURCE" tab.
    example :
    select owner as SCHEMA
    from all_tables
    where ...or a SQL Statement in ODI MASTER_Repository to get the logical schema :
    select lschema_name as SCHEMA
    from snp_lschema t1
    where ...And in the "command as destination" tab, you execute the PL SQL, but you use the result of SCHEMA.
    As a result, if you have 40 schema retrieved by the first SQL Statement, ODI will execut your PL/SQL statement 40 times, changing the SCHEMA value each time.
    And, in the first tab (command as destination), you use a generic Oracle User that have access to all schema of the dabase (or at least, the 40 schema you want).

  • How to call a Windows DLL out of a ODI procedure?

    Hi
    we'd like to use an external tool, provided as a MS Windows DLL, in our odi flow.
    The idea is to use an ODI procedure preparing the input, calling the dll function and handling the functions output.
    Is this possible? How?
    Thanks a lot!

    Perhaps Netbeans is having troubles with the import statements in the wsdl.  OSS note 738912 describes how to combine the 3 parts of the downloaded wsdl into a single file.

  • Is this Possible using ODI / ODQ ?

    Hi ALL,
    Is the below requirement possible with ODI / ODQ?
    (right now I am doing it mannually, and its like a monthly/weekly process)
    If we can do the same using ODQ how I need to start and proceed?
    My requirement is some thing like this. I have two columns
    Address1 (street address)
    Address2 (additional Information)
    In some cases the address is not in the proper format. So I need to do some data cleansing (data scrubbing) before loading using ODI
    Use Address2 if Address1 is PO Box, building name, or any info aside from a street address. Only one address column is needed in the output (Address1)
    For example :
    INPUT
    ADDRESS1--------------------------------------------------ADDRESS2
    HIGHWAY # ------------------------------------------------5010944 MARSH RD
    PO BOX 40964---------------------------------------------1100 AA CORP PARKWAY
    DBA VANTAGE PP---------------------------------------11031 PERRY HIGHWAY
    HOME INFUSION THERAPY SERVICES--------11031 PERRY HIGHWAY
    7275 BUFFALO ROAD----------------------------------(WAS 6855 BUFFALO ROAD)
    7601 N FEDERAL HWY---------------------------------#2506
    MCAS ---------------------------------------------------------(MARINE CORPS AIR STATION)
    212 BRADDOCK AVENUE------------------------------
    212 NINTH STREET----------------------------------------
    2138 JONATHON DRIVE---------------------------------
    OUTPUT (Note : we don&rsquo;t need the Address2 column in the output)
    ADDRESS1----------------------------------ADDRESS2
    10944 MARSH RD------------------------10944 MARSH RD
    1100 AA CORP PARKWAY-----------1100 AA CORP PARKWAY
    11031 PERRY HIGHWAY-------------11031 PERRY HIGHWAY
    11031 PERRY HIGHWAY-------------11031 PERRY HIGHWAY
    7275 BUFFALO ROAD------------------(WAS 6855 BUFFALO ROAD)
    7601 N FEDERAL HWY----------------#2506
    MCAS-----------------------------------------(MARINE CORPS AIR STATION)
    212 BRADDOCK AVENUE------------
    212 NINTH STREET----------------------
    2138 JONATHON DRIVE---------------
    I have posted a similar kind of question in DATA Quality (ODQ) forum
    Forum Home &raquo; Master Data Management (MDM) &raquo; Data Quality
    ADDRESS CLEANING(US) USING ODQ
    Thread: ADDRESS CLEANING(US) USING ODQ
    if any body is working on address cleansing using ODQ, Please guide me to start working on it.
    IS there any specific documents for ADDRESS CLEANING which gives more information about the process flows such as
    Transformer, Customer Data Parser, Sort for Postal Matcher, Postal Matcher, Window Key Generator,Sort for Linking, Relationship Linker, Commonizer, and Data Reconstructor.
    Thanks in Advance,
    Rathish

    Hi Rathish,
    I was building the java code but I got other idea to make more simple.
    1) load the values into a temp table with one column for each address (means 2 columns per line) plus 2 other columns to control.
    Something like:
    table temp_data
    columns: add_1 , control_1, add_2, control_2
    You can do that thru an interface. Let the fields "control" with no value when loaded
    2) create a table to storage the values you sent to me (Avenue, street...)
    table street_names
    columns: street_name, country (to your future use)
    3) Create an ODI procedure (or you can customize a KM with the same technique)
    3.1) Step 1 at target Tab, technology javaScript
    code:
    <@String vU=" ";@>
    3.2.1) step 2 - Tab Source - technology "your database" and the Logical Schema where the "street_names" table as created
    select street_name
    from street_names
    where country = 'US'
    3.2.2) step 3 - Tab Target - tecnology javaScript
    <@vU+="or instr(upper(add_1),upper('#street_name'))>0 ";@>
    3.3) step 3 - Target Tab - technology "your database" and the Logical Schema where the "temp_data" table as created
    <@vU=vU.substring(3);@>
    update temp_data
    set control_1 = 'Y'
    where <@=vU@>
    3.4) step 4 step 3 - Target Tab - technology "your database" and the Logical Schema where the "temp_data" table as created
    <@vU=vU.replaceAll("add_1","add_2")@>
    update temp_data
    set control_2 = 'Y'
    where <@=vU@>
    4) Now you have a table (temp_data) with a flag "Y" where there is a street name and "null" where doesn't exist. Just generate your file by a interface or odiSqlUnload Toll.
    Put all together into a package and you will have your process.
    I create in this way to minimize the access to the temp_table, just 2 updates.
    can be used some alternatives to tunning the hole process if the time doesn't match what you need.
    That is a fast solution. Something more elaborated can be done if necessary.
    Does it help you?
    Cezar Santos

  • Error in ODI procedure

    Hi Experts,
    I have created following procedure and triyng to get column value by using rownum. When I run the scenario, I am getting following exception at ODI Procedure step. Can any one please help me on it
    I have created loop package to fetch column value until loop end.
    Please let me know if you are not clear my query
    ODI Procedure:
    begin
    select a.eno into '#EMPNO' from (select rownum r,e.* from trg_emp_01 e) a where a.r=#Counter;
    end;
    #EMPNO variable created as alphanumeric datatype and
    #Counter variable created as alphanumic datatype and it is assign with '1' value
    Exception:
    6550 : 65000 : java.sql.SQLException: ORA-06550: line 1, column 25:
    PLS-00220: simple name required in this context
    ORA-06550: line 1, column 28:
    PL/SQL: ORA-00904: : invalid identifier
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    java.sql.SQLException: ORA-06550: line 1, column 25:
    PLS-00220: simple name required in this context
    ORA-06550: line 1, column 28:
    PL/SQL: ORA-00904: : invalid identifier
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:595)
    ODI Procedure:
    begin
    select a.eno into #EMPNO from (select rownum r,e.* from trg_emp_01 e) a where a.r=#Counter;
    end;
    Exception:
    6550 : 65000 : java.sql.SQLException: ORA-06550: line 1, column 26:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    java.sql.SQLException: ORA-06550: line 1, column 26:
    PL/SQL: ORA-00936: missing expression
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:595)
    Thanks
    Phani
    Edited by: Phanikanth on Jul 9, 2010 1:25 AM
    Edited by: Phanikanth on Jul 9, 2010 2:08 AM

    Good point - In my case, these are single executable statements. These have been saved in ODI and executed successfully. Just no using my machine.
    EXAMPLE 1------------
    DECLARE
    RetVal ;
    I_STRING VARCHAR2(200);
    BEGIN
    I_STRING := '';
    RetVal := XXX.PKG_XXX.SF_COMMA_TO_TABLE ( I_STRING );
    COMMIT;
    END;
    EXAMPLE 2------------
    SELECT C.COL1, B.COL2, B.COL3,TO_CHAR(B.EFFDT,'YYYY-MM-DD') COL4,B.COL5,B.COL6
    FROM TABLE1 A, TABLE2 B, TABLE3 C
    WHERE
    and A.ID = 'XXX'
    and a.setcntrlvalue = ' '
    AND A.NAME = 'XXX'
    AND A.EFFDT =
    (SELECT MAX(A_ED.EFFDT) FROM TABLE1 A_ED
    WHERE A.SETID = A_ED.SETID
    AND A_ED.EFFDT <= SYSDATE)
    AND B.EFFDT =
    (SELECT MAX(B_ED.EFFDT) FROM TABLE2 B_ED
    WHERE B.SETID = B_ED.SETID
    AND B.ACCOUNT = B_ED.ACCOUNT
    AND B_ED.EFFDT <= SYSDATE)
    AND A.SETID = B.SETID
    AND A.RANGE_FROM = A.RANGE_TO
    AND B.ACCOUNT = A.RANGE_FROM
    AND A.SETID = C.SETID
    AND A.TREE_NAME = C.TREE_NAME
    AND A.TREE_NODE_NUM = C.TREE_NODE_NUM
    AND C.EFFDT =
    (SELECT MAX(C_ED.EFFDT) FROM TABLE3 C_ED
    WHERE C.SETID = C_ED.SETID
    AND C_ED.EFFDT <= A.EFFDT)
    ------------------

  • How to execute unix command from ODI Procedure

    Hi,
    I am trying to execute below unix command from ODI Procedure (Command on Target tab) but I am getting the error "java.io.IOException: Cannot run program "cd": error=2, No such file or directory" but when I try to execute the same command using OdiOSCommand, it is executing successfully. I don't want to use shell script to execute this command. Is there any specific syntax am I missing to execute this command from ODI procedure?
    cd /project3/tmt/;ls *.dmp > dmplist.lst
    Please help me on this...
    Thanks
    MT

    Hi nahlikh,
    Thank you for the reply.
    I used below command in Procedure but still getting the same error as "java.io.IOException: Cannot run program "OdiOSCommand": error=2, No such file or directory".
    OdiOSCommand "-COMMAND=cd /project3/tmt/;ls *.dmp > dmplist.lst"
    as I mentioned earlier if I use the command cd /project3/tmt/;ls *.dmp > dmplist.lst in OdiOSCommand tool it is executing successfully without any issues.
    any thoughts appreciated to get a solution for this issue.
    Thanks
    MT

Maybe you are looking for

  • Variable Substitution not working for multiple files

    Hi, Have a scenario in which we are using Interface Collection with multiple files as output. The naming of the files is derived from a payload field as follows. payload:MT_OrdersAck,1,Order,1,File_Header,1,StoreNo,1 When the first file is generated

  • Unable to open PDF files with acroread

    Hi, We have a solaris 9 server with acroread installed on the server. When I log in to the server with any local user (root or any other user) I'm able to open the PDF files which are locally on the server as well the PDF files which are on NFS Share

  • Are u all happy with nokia N97 unlock method????

    i wonder why so high end phone must press unlock side key to unlock phone.....why can't make it like iphone drag from left to right to unlock the phone without have to press any key....simple just touch the screen and drag bar to unlock the phone....

  • BI new Implementation

    Hi All, Could anyone pls answer below my question? 1) Once New BI installation is done, What are  settings that need to be done to make it ready for Development? 2) Since it is new system , I need to connect to Source system which ECC6.0. What are th

  • NEED HELP ASAP !!!! ANY ADVICE WOULD BE HELPFUL .....!!

    I have a bb torch which i am selling to someone in a few days, but i want to run a security wipe in it before i give it to him. But my problem is my keypad dosen't work so is there any other way i could run the securiity wipe in it??? I need to know