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

Similar Messages

  • Error in updating the source table in mapping

    Hi All,
    I have a mapping in which I am fetching records from a table A, performing some expression logic and then using a Splitter operator to update my target table Bas well as update one of the columns of my source table A(to indicate that record has been processed). When I execute the mapping, updation of target table B works, but updting my source table A does nt work and the job completes succesfully?
    Can somebody please help me to debug this?
    Thanks

    Hi,
    Please check the splitter condition for the two groups that you have set. This might be a case where you have put such a condition in splitter that all the record sets are going to the target table and none are going to the source table. Therefore the source table is not getting updated by any record.
    Regards
    -AP

  • Dynamically passing the source table name to OWB mapping

    I am building a mapping wherein one of the source tables is a view. The view name varies with the time parameter I pass in. I am looking at ways to pass in the time parameter to the mapping procedure such that it first gets the view name from a table and uses that view as the source table to fetch data. Any directions?
    In normal PL/SQL coding, I can first get the view name and use this view name to buld a dynamic query, which can be then executed.

    This is a common question. The best way to do this is to use a synonym.
    Create the synonym in the database and import into OWB. Use the synonym in your mapping. Have your mapping accept a mapping input for the table you want the synonym to point to. Setup a premapping process to re-create the synonym with the table you want to use.
    Here is the procedure that I use. It defaults to a private synonym. Remember, the synonym will be created in the same schema that the mapping is deployed to.
    CREATE OR REPLACE PROCEDURE "CAWDATA"."CREATE_SYNONYM_PRC" ("P_SYNONYM_NAME" IN VARCHAR2,  "P_OBJECT_NAME" IN VARCHAR2,
    "P_IS_PUBLIC_SYNONYM" IN BOOLEAN DEFAULT false)    IS
    BEGIN
    if p_is_public_synonym = true then
    execute immediate 'create or replace public synonym '|| p_synonym_name || ' for '|| p_object_name;
    else
    execute immediate 'create or replace synonym '|| p_synonym_name || ' for '|| p_object_name;
    end if;
    exception
    when others
    then
          raise_application_error(sqlcode,sqlerrm) ;
    END;

  • Re: getting the source tables into models in designer

    Hi all
    i need help while extracting the source table's to ODI designer
    my source: Oracle
    Question:
    i have given the source schema information. with that information i created logical and physical schema in topology manager.
    And trying to create a model to extract source tables to ODI.
    As i don't have all tables in the same schema (some tables were coming from different users and i don't have the information of those users) am unable to see the those tables when in selective reverse tab.
    i requested them to give select privileges for those tables in the schema which am using.
    after getting the select privileges for those tables.
    will i would be able to see those tables in selective reverse tab?
    Could some one guide me steps in this.
    Thanks

    917704 wrote:
    Hi Alastair
    firstly thank you for your reply.
    my soure is oracle erp.
    i cannot create physical/logical schemas for that user bez as it is head user in oracle erp, i dont have the access for that user.Hi, I've done change data capture from ebusiness suite using ODI, what we did was this :
    get a 'read only' database account set up in the ebiz suite database, this is your connecting user and your work schema (for CDC objects).
    grant select any table, or be more specific if you wish on the objects you need to read data from to ODI, then connect as your read only user but map the physical schemas as you wish.
    Back to your original question, a model can only have one logical schema, which in turn maps to one phyiscal schema - so I think your stuck needing to read across more than one schema on the source system.

  • DBMS_CHANGE_NOTIFICATION and accessing data values part of the source table

    Hi there,
    I am using DBMS_CHANGE_NOTIFICATION following the steps mentioned in this link
    http://www.oracle-base.com/articles/10g/dbms_change_notification_10gR2.php
    Everything works fine and i am able to capture the insert event on a specific table which I have set notification listener on and subsequently trigger the follow on course of activities.
    One thing I am looking for is getting the actual values used as part of the insert event happening on the source table.
    e.g.) DBMS_CHANGE_NOTIFICATION (insert operation) applied on table TEST.
    This table TEST has 2 columns (col1 varchar2(200), col2 number (10))
    Fire an insert operation. Insert into TEST values ('testing notification',201); commit;
    As part of the event I get Table (SCOTT.TEST) - Records Inserted. Rows=
    But I need to know the specific value committed to the database table as part of the insert i.e. 201 in this case. How can i capture this as part of the event notification mechanism.
    The workaround would be to query the source table as part of the notification body workflow and retrieve the most recent record but I wanted to know if this can be achieved via the regular notification event process.
    Regards,
    Regards,

    Hi
    it is exactly the way you describe. Procedures are called with privs of the owner...
    Paul

  • How do I create a target table with the same PK as the source table?

    I am trying to create a target table in a mapping that will end up with the same primary key as the source table.
    It is a simple map that simply uses a subset of the columns of the source table in the target table. I was wanting to create and bind a new table by dragging the columns I want from the source to the initially blank target table operator, change the column names and create a primary key to match the source table.
    I can't seem to be able to create a constraint on the table in the mapping. I can create the constraint after the table is created and boound to the database object but the PK doesn't carry back into the mapping.
    I need it in the mapping so I can use the UPDATE/INSERT operation and use the 'All Constraints' implementation. The mapping won't let me validate the object without the PK on it in the map.
    Believe it or not folks, I am getting better at this.
    Thanks very much for the guidance.
    Gary

    Hi Gary
    You are close, you are really close... :-))
    You need to do exactly as you propose plus one extra step. Build the map as you describe, binding the new table to the target. Then you edit the table definition to add the primary key and any other constraints you need. After this is the step that you are missing.
    You need to do the following:
    1. Go back and re-edit the map
    2. Right click on the table
    3. From the pop up menu, select Reconcile Inbound
    4. Set any operators that you need for the UPDATE/INSERT
    5. Save the map
    6. Commit your changes
    The first three steps above make the map read in the indexes and constraints that you set on the table. Finally, you need to deploy the table and then deploy the map.
    Hope this helps
    Regards
    Michael

  • Best approach to delete records that are not in the source table anymore.

    I have a situation where I need to remove records from dimensions that are not in the source data anymore. Right now we are not maintaing history, i.e. not using SCD but planning for the next release. If we did that it would be easy to figure the latest records. The load is nightly and records are updated and new added.
    The approach that I am considering is to join the dimension tables the the sources on keys and delete what doesn't join. However, is there perhaps some function in OWB that would allow to do this automatically on import so it can be also in place for the future?
    Thanks!

    Bear in mind that deleting dimension records becomes problematic if you have facts attached to them. Just because this record is no longer in the active set doesn't mean that it wasn't used historically, and so have foreign key constraints on it in your database. IF this is the case, a short-term solution would be to add an expiry_date field to the dimension and update the load to set this value when the record disappears rather than to delete it.
    And to do that, use the target dimension as a source table, outer join it to the actual source table on the natural key, and so your update will set expiry_date=nvl(expiry_date,sysdate) to set to sysdate if this record has not already been expired on all records where the outer join fails.
    Further consideration: what do you do if the record is re-inserted into the source table? create a new dimension key? Or remove the expiry date?
    But I will say that I am not a fan of deleting records in most circumstances. What do you do if you discover a calculation error and need to fix that and republish historical cubes? Without the historical data, you lose the ability to do things like that.

  • Any way to know the source table of a Form at  runtime

    Hi,
    Is there any way to know the source table/view.. of a form at run time.
    Thanks in advance

    Hi,
    But Get_Block_Property( ..., DML_DATA_TARGET_NAME)
    should be coded, I mean any way to know at the
    runtime, as like we get the Error from the
    Help->Display Errors.If you are asking if there is a way to get this information from the default menu, then the answer is no. However, you can create your own custom menu, or a button in your form that displays that information using the Get_Block_Property when you click on your menu item or button.

  • "Referenced" Table Cells not copying formatting of the source table

    Hi-
    I have one sheet that has a rental inventory table that is quite large.  On another page, I have a "printable" version that has filtering applied to hide certain columns.
    What I did orginally was duplicate the table on the inventory page, cut it, then go to my printable sheet, and paste it.  I now have a duplicate version of the original.  Then I go and select all cells, hit delete and all the contents disappear leaving me with the correct formating.
    At this point I can type in cells and see that the formating is intact (certain cells are in Bold for example).
    I delete the test contents, then reference the first cell (a1) to the source table, then copy the references across that entire printable table.  Once I've done that, all of the contents of the source table now appear in the "printable" table. 
    The problem is, that once I reference the source table, the formatting goes away.  The data shows up correctly:  ie, =Equip List :: B2, but the specific cell formating is gone.
    What am i doing wrong here?
    Thanks
    Matt

    "I delete the test contents, then reference the first cell (a1) to the source table, then copy the references across that entire printable table."
    If you do this by selecting and Copying the first cell containing the formula, that "copy" includes the formatting of the copied cell. If you then Paste, the Paste includes that format setting. You could try Edit > Paste and Match format.
    If that doesn't work, you could try this:
    Enter, then fill the formula as you've done, then set the format of each cell or group of cells to include the attributes you want at that location.
    Regards,
    Barry

  • ORA-30926: unable to get a stable set of rows in the source tables

    hi,
    I am loading data from source table to target table in a interface.
    Using LKM incremental update .
    In the merge rows step , getting the below error.
    30926 : 99999 : java.sql.SQLException: ORA-30926: unable to get a stable set of rows in the source tables
    please help as what should be done to resolve this.

    Below is the query in the merge step...
    when i run from SQL also, same error
    SQL Error: ORA-30926: unable to get a stable set of rows in the source tables
    30926. 00000 - "unable to get a stable set of rows in the source tables"
    *Cause:    A stable set of rows could not be got because of large dml
    activity or a non-deterministic where clause.
    *Action:   Remove any non-deterministic where clauses and reissue the dml.
    merge into     TFR.INVENTORIES T
    using     TFR.I$_INVENTORIES S
    on     (
              T.ORGANIZATION_ID=S.ORGANIZATION_ID
         and          T.ITEM_ID=S.ITEM_ID
    when matched
    then update set
         T.ITEM_TYPE     = S.ITEM_TYPE,
         T.SEGMENT1     = S.SEGMENT1,
         T.DESCRIPTION     = S.DESCRIPTION,
         T.LIST_PRICE_PER_UNIT     = S.LIST_PRICE_PER_UNIT,
         T.CREATED_BY     = S.CREATED_BY,
         T.DEFAULT_SO_SOURCE_TYPE     = S.DEFAULT_SO_SOURCE_TYPE,
         T.MATERIAL_BILLABLE_FLAG     = S.MATERIAL_BILLABLE_FLAG,
         T.LAST_UPDATED_BY     = S.LAST_UPDATED_BY
         ,T.ID     = TFR.INVENTORIES_SEQ.NEXTVAL,
         T.CREATION_DATE     = CURRENT_DATE,
         T.LAST_UPDATE_DATE     = CURRENT_DATE
    when not matched
    then insert
         T.ORGANIZATION_ID,
         T.ITEM_ID,
         T.ITEM_TYPE,
         T.SEGMENT1,
         T.DESCRIPTION,
         T.LIST_PRICE_PER_UNIT,
         T.CREATED_BY,
         T.DEFAULT_SO_SOURCE_TYPE,
         T.MATERIAL_BILLABLE_FLAG,
         T.LAST_UPDATED_BY
         ,T.ID,
         T.CREATION_DATE,
         T.LAST_UPDATE_DATE
    values
         S.ORGANIZATION_ID,
         S.ITEM_ID,
         S.ITEM_TYPE,
         S.SEGMENT1,
         S.DESCRIPTION,
         S.LIST_PRICE_PER_UNIT,
         S.CREATED_BY,
         S.DEFAULT_SO_SOURCE_TYPE,
         S.MATERIAL_BILLABLE_FLAG,
         S.LAST_UPDATED_BY
         ,TFR.INVENTORIES_SEQ.NEXTVAL,
         CURRENT_DATE,
         CURRENT_DATE
         )

  • MERGE error : unable to get a stable set of rows in the source tables

    Hi,
    For an update, the following MERGE statement throws the error-unable to get a stable set of rows in the source tables:
    MERGE INTO table2t INT
    USING (SELECT DISTINCT NULL bdl_inst_id,.......
    FROM table1 ftp
    WHERE ftp.gld_business_date = g_business_date
    AND ftp.underlying_instrument_id IS NOT NULL) ui
    ON ( ( INT.inst_id = ui.inst_id
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.ric = ui.ric
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.isin = ui.isin
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.sedol = ui.sedol
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.cusip = ui.cusip
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    WHEN MATCHED THEN
    UPDATE
    SET INT.inst_id = ui.inst_id, INT.ric = ui.ric
    WHEN NOT MATCHED THEN
    INSERT (inst_key, ......)
    VALUES (inst_key, ......);
    To determine the existence of a record, first check if any match is found on the first key, if not then search for the second key and so on.
    Now two records with differenct first key, i.e. inst_id, can have the same ric(second key). On a rerun, with the target table already populated, the code fails. The reason is it finds duplicate entries for the second key.
    Any suggestions on how to make this work?
    Thanks in advance.
    Annie

    Annie
    You've spotted the problem (that two records have the same RIC). MERGE doesn't allow that; each record in the data being updated is only allowed to be updated once.
    Is there a PK column (or columns) that we can rely on?
    What you can try is to outer join FTP to INT. Something like:
    MERGE INTO INT int1
    USING (
        select columns_you_need
        from (
            select ftp.columns -- whatever they are
                   , int2.columns
                   , row_number() over (partition by int2.pk_columns order by int2.somecolumns) as rn
            from   ftp
            left join int int2
            on (the condition you used in your query)
        where rn=1
    ) s
    WHEN MATCHED THEN UPDATE ...
    WHEN NOT MATCHED THEN INSERT ...So if you can restrict the driving query so that only the first one of the possible updates actually gets presented to the MERGE operation, you might be in with a chance :-)
    And of course this error is nothing to do with any triggers.
    HTH
    Regards Nigel

  • ORA-30926: unable to get a stable set of rows in the source  table

    When user are trying to open a form getting below error.
    com.retek.platform.exception.RetekUnknownSystemException:ORA-30926: unable to get a stable set of rows in the source tables
    Please advice
    Edited by: user13382934 on Jul 9, 2011 1:32 PM

    Please try this
    create table UPDTE_DEFERRED_MAILING_RECORDS nologging as
    SELECT distinct a.CUST_ID,
    a.EMP_ID,
    a.PURCHASE_DATE,
    a.drank,
    c.CONTACT_CD,
    c.NEW_CUST_CD,
    a.DM_ROW_ID
    FROM (SELECT a.ROWID AS DM_ROW_ID,
    a.CUST_ID,
    a.EMP_ID,
    a.PURCHASE_DATE,
    dense_rank() over(PARTITION BY a.CUST_ID, a.EMP_ID ORDER
    BY a.PURCHASE_DATE DESC, a.ROWID) DRANK
    FROM deferred_mailing a) a,
    customer c
    WHERE a.CUST_ID = c.CUST_ID
    AND a.EMP_ID = c.EMP_ID
    AND (a.PURCHASE_DATE <= c.PURCHASE_DATE OR
    c.PURCHASE_DATE IS NULL)
    and a.drank=1;
    The query you've posted is behaving according to the expectations. The inner select is returning one row and the outer is returning two as the
    WHERE a.CUST_ID = c.CUST_ID
    AND a.EMP_ID = c.EMP_ID
    AND (a.PURCHASE_DATE <= c.PURCHASE_DATE OR
    c.PURCHASE_DATE IS NULL)
    conditions are seeing two rows in the table customer.
    I've added the a.drank=1 clause to skip the duplicates from the inner table and distinct in the final result to remove duplicates from the overall query result.
    For eg, if you have one more row in the deferred_mailing like this
    SQL> select * from DEFERRED_MAILING;
    CUST_ID EMP_ID PURCHASE_
    444 10 11-JAN-11
    444 10 11-JAN-11
    then the query without "a.drank=1" will return 4 rows like this by the outer query.
    CUST_ID EMP_ID PURCHASE_ DM_ROW_ID DRANK C N
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    It'll return the below even if we use distinct on the same query(i.e. without a.drank=1)
    CUST_ID EMP_ID PURCHASE_ DM_ROW_ID DRANK C N
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    which contains duplicates again.
    So, we need a combination of distinct and dense here.
    btw, Please mark the thread as 'answered', if you feel you got your question answered. This will save the time of others who search for open questions to answer.
    Regards,
    CSM

  • Best approach to get the source tables into Target

    Hi
    I am new to Goldengate and I would like to know what is the best approach to get the Source tables to be replicated into the target (oracle to oracle) before performing the initial load without using exp/expdp . Is there any native Goldengate utility which i can use during the initial load or before that will create the tables on the target before loading the data ?
    Thanks

    i dont think so, for the initial load replication your struncture should be available at target machine. once your machines are in sync then you can use goldengate ddl setup for automatically replicate the table with data. 
    Batter approach for you to create a structure on target machine using export improt.  In export use conect=metadata_only for copy the structure only.....
    like
    EXPDP <<user>>/<<password>>@connection_string schemas=abc directory=TEST_DIR dumpfile= gg.dmp Content = metadata_only logfile= gg.log

  • How to find the Source Table in one corresponding schema?

    Hi All,
    How to find the Source Table in one corresponding schema?
    regards,
    DB

    DB wrote:
    Hi All,
    How to find the Source Table in one corresponding schema?
    regards,
    DBHUH?
    I do not understand your question
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • I want to define the Source Table from the Oralce Database. 11.1.1.3

    Dear all,
    How can i Define the Source table to take data from Oracle Database, and the target to be Essbase ?
    Another Qusetion
    Have i use the ERPi in FDQM ?
    If i have Why u should use ERPi ? ?

    Please note that the example in the admin guide is looping through a recordset and doing an append. If you are importing a large amount of data from a source table, this script is not efficent and will result in out of memory errors. You would want to do an insert into on the work table during the import process. This can be done using the FDM API.

Maybe you are looking for