Reconciliation to other tables (than USR)

Hello,
I am using Database Tables Connector to reconcile data from HR system to OIM, the connector reconciles data from table e.g. USERS in HR system to OIM (USR table - it is hard-coded in the connector) - this mechanism works really fine...
...but...
...in the HR system I have some other tables that store data about organizational structure and I would like to create some new tables in OIM schema (regarding organizational structure) and reconcile also this data, so my question is: Is it possible to do that using Database Tables Connector? Maybe through come customization of this connector, because as I have mentioned the connector reconciles data to USR table (in OIM) by default. Did anybody face similar scenario?
Thanks in advance!
Maciej.

Hi,
I have a scenario like yours. Here is what I am doing:
- Cretead lookups to store the lists of my target system;
Lookups.HR.ModelTypes
- Created an IT Resource of Database to connect to the database of my target system;
Resource Name = DBHR
DatabaseName = DBHR
Driver = oracle.jdbc.driver.OracleDriver
Password = *******
URL = jdbc:oracle:thin:@win2k3base:1521:orcl
UserID = DBHR_User
- Created a schedule task to reconcile the lookups. Below are the parameters of this task;
package scheduler.tasks;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Hashtable;
import com.thortech.xl.util.adapters.tcUtilXellerateOperations;
public class TaskLoadLookupFromDatabase extends SchedulerBaseTask {
     * Definitions of the task parameters
     private String strLookupCodeName;
     private String strITResourceName;
     private String strTableName;
     private String strFieldNameForCodeKey;
     private String strFieldNameForDecode;
     private String strFieldNameForCountryCode;
     private String strFieldNameForLanguageCode;
     private String strSQLForFilter;
     protected tcLookupOperationsIntf xlLookupOpIntf = null;
     protected Logger logger = Logger.getLogger("log4j.logger.BAT.OIM.SCHEDULER_TASKS");
     protected String CLASS_NAME = this.getClass().getName();
     * ITResource parameters
     private String strDriver = null;
     private String strDbURL = null;
     private String strAdminId = null;
     private String strAdminPwd = null;
     public TaskLoadLookupFromDatabase() {
          super();
     protected void addLookupItem(String lookupCodeName, String codeKey,
               String decodedValue, String languageCode, String countryCode){
          logger.debug(String.format("CODEKEY = %s DECODE = %s", codeKey, decodedValue));
          try {
               xlLookupOpIntf.addLookupValue(lookupCodeName, codeKey, decodedValue,
                         languageCode, countryCode);
          } catch (tcInvalidValueException dupValEx) {
               try {
                    HashMap<String, String> decodedMap = new HashMap<String, String>();
                    decodedMap.put("LKV_DECODED", decodedValue);
                    // Updates the Decode value of an existent CodeKey
                    xlLookupOpIntf.updateLookupValue(lookupCodeName, codeKey, decodedMap);
               } catch (tcAPIException apiEx) {
                    logger.debug("New value is same as existing value.");
               } catch (Exception ex) {
                    logger.error("Error Updating Lookup: " + ex.toString(), ex);
          } catch (tcAPIException apiEx) {
               logger.error("Error Adding Lookup: " + apiEx.toString(), apiEx);
          } catch (Exception ex) {
               logger.error("Error Adding Lookup: " + ex.toString(), ex);
     public boolean stop() {
          logger.debug("Entering stop() for " + CLASS_NAME);
          return true;
     public void init() {
          logger.debug("Entering init() method : " + CLASS_NAME);
          try {
               // LookupCodeName, ITResourceName, TableName, FieldNameForCodeKey,
               // FieldNameForDecode, SQLForFilter
               strLookupCodeName = this.getAttribute("LookupCodeName");
               strITResourceName = getAttribute("ITResourceName");
               strTableName = this.getAttribute("TableName");
               strFieldNameForCodeKey = this.getAttribute("FieldNameForCodeKey");
               strFieldNameForDecode = this.getAttribute("FieldNameForDecode");
               try{
                    strFieldNameForCountryCode = this.getAttribute("FieldNameForCountryCode");
                    strFieldNameForLanguageCode = this.getAttribute("FieldNameForLanguageCode");                    
               }catch(Exception ex){}
               strSQLForFilter = this.getAttribute("SQLForFilter");
               logger.debug("###########################");
               logger.debug("LookupCodeName: " + strLookupCodeName);
               logger.debug("ITResourceName: " + strITResourceName);
               logger.debug("TableName: " + strTableName);
               logger.debug("FieldNameForCodeKey: " + strFieldNameForCodeKey);
               logger.debug("FieldNameForDecode: " + strFieldNameForDecode);
               logger.debug("FieldNameForCountryCode: " + strFieldNameForCountryCode);
               logger.debug("FieldNameForLanguageCode: " + strFieldNameForLanguageCode);               
               logger.debug("SQLForFilter: " + strSQLForFilter);
               logger.debug("###########################");
               this.validateString(strLookupCodeName,
                         "The parameter LookupCodeName can not be null.");
               this.validateString(strITResourceName,
                         "The parameter ITResourceName can not be null.");
               this.validateString(strTableName,
                         "The parameter TableName can not be null.");
               this.validateString(strFieldNameForCodeKey,
                         "The parameter FieldNameForCodeKey can not be null.");
               this.validateString(strFieldNameForDecode,
                         "The parameter FieldNameForDecode can not be null.");
               xlLookupOpIntf = (Thor.API.Operations.tcLookupOperationsIntf) getUtility("Thor.API.Operations.tcLookupOperationsIntf");
          } catch (Exception ex) {
               logger.error("Error in init() method : " + ex.toString());
               this.setResult(ex);
               this.stopExecution();
               return;
          logger.debug("Exiting init() method: " + CLASS_NAME);
     * Method : execute Description : overridden execute() method of
     * BaseScheduleTask; Establishes a connection to the database and execute a
     * SQL statement based on the parameters
     public void execute() {
          logger.debug("Entering execute() method: " + CLASS_NAME);
          Connection con = null;
          ResultSet rset = null;
          if (this.isStopped()) return;
          Hashtable htITResDetails = null;
          try {
               // Loads the IT Resource parameters
               htITResDetails = tcUtilXellerateOperations.getITAssetProperties(this
                         .getDataBase(), strITResourceName);
               // get connection details from IT resource
               strDriver = (String) htITResDetails.get("Driver");
               strDbURL = (String) htITResDetails.get("URL");
               strAdminId = (String) htITResDetails.get("UserID");
               strAdminPwd = (String) htITResDetails.get("Password");
               Class.forName(this.strDriver);
               con = DriverManager.getConnection(this.strDbURL, this.strAdminId,
                         this.strAdminPwd);
               Statement stmt = con.createStatement();
               // Builds the SQL Statement
               StringBuffer strSQLStmt = new StringBuffer();
               strSQLStmt.append(" SELECT ");
               strSQLStmt.append(strFieldNameForCodeKey + ", "
                         + strFieldNameForDecode);
               if((strFieldNameForCountryCode != null) && (!strFieldNameForCountryCode.equals(""))){
                    strSQLStmt.append(", " + strFieldNameForCountryCode);
               if((strFieldNameForLanguageCode != null) && (!strFieldNameForLanguageCode.equals(""))){
                    strSQLStmt.append(", " + strFieldNameForLanguageCode);
               strSQLStmt.append(" FROM ");
               strSQLStmt.append(strTableName);
               if (strSQLForFilter != null && !strSQLForFilter.trim().equals("")) {
                    strSQLStmt.append(" WHERE ");
                    strSQLStmt.append(strSQLForFilter);
               rset = stmt.executeQuery(strSQLStmt.toString());
               logger.debug("#########################################");               
               String strCountryCode = "";
               String strLanguageCode = "";
               while (rset.next()&& (this.isStopped() == false)) {
                    strCountryCode = "";
                    strLanguageCode = "";
                    String strCodeKey = rset.getString(strFieldNameForCodeKey);
                    String strDecode = rset.getString(strFieldNameForDecode);
                    if((strFieldNameForCountryCode != null) && (!strFieldNameForCountryCode.equals(""))){
                         strCountryCode = rset.getString(strFieldNameForCountryCode);
                    if((strFieldNameForLanguageCode != null) && (!strFieldNameForLanguageCode.equals(""))){
                         strLanguageCode = rset.getString(strFieldNameForLanguageCode);
                    this.addLookupItem(strLookupCodeName, strCodeKey, strDecode, strCountryCode, strLanguageCode);                    
               logger.debug("#########################################");
          } catch (Exception ex) {
               logger.error("Error in execute() method: " + ex.toString());
               this.setResult(ex);
               this.stopExecution();
               return;
          logger.debug("Exiting execute() method: " + CLASS_NAME);
     public void validateString(String str, String errorMessage)
               throws Exception {
          if ((str == null) || str.trim().equals("")) {
               throw new Exception(errorMessage);
- Created a schedule task of TaskLoadLookupFromDatabase and set the parameters below:
LookupCodeName= Lookups.HR.ModelTypes;
ITResourceName = DBHR;
TableName = Model
FieldNameForCodeKey = Model_Code
FieldNameForDecode = Model_Name
FieldNameForCountryCode =
FieldNameForLanguageCode =
SQLForFilter = Model_Type = 'P' and Model_Active = 'Y'
Thanks,
Renato.

Similar Messages

  • Table referenced by more than one other table

    I'm no DBA so I was wondering if you could answer this fairly basic question. If I have a table that references more than 1 other table. For example Order links to a customer or Order can link to an Employee how would I represent that in the data model?
    I'm guessing I could have the Order table have both an Employee ID and a Customer ID columns and null one or the other out depending on whether it was linked to an Employee or Customer but that seems a bit redundant in that there would always be at least one column being null.
    Perhaps I could use table inheritance and just add the relevant foreign key col on the inherited tables but I'm fairly sure you can't have abstract tables.
    Thanks for the help.

    For example:
    table a = Primary_key1, col2, col3
    table b = Primary_key1, primary_key2, col3
    table c = Primary_key2, col2
    To join all this tables you must do something like this:
    select ....
    from tablea,tableb,tablec
    where tablea.Primary_key1=tableb.primary_key1 and
    tableb.Primary_key2=tablec.primary2;

  • Creating table in other databases than Oracle

    Hi
    It would be nice to be able to create tables in a JDBC Connection in other databases than Oracle. Why limit it to Oracle when there is a SQL standard to work with?
    Regards,
    Fredrik

    Generic SQL isn't really as generic as people would like to believe.
    In any case, we're working on that for an upcomming release, but with the current time constraints, we just got the Oracle table creation support done.
    (The time is more on testing than writing the feature)
    It'll get in there, but probably not in the next release.
    Rob

  • Trigger to insert unique data into other table (having more than 40 millions of records) - MYSQL

    Hi All,
    i am facing impact of trigger in MYSQL, scenario is this:
    I am Having one table with duplicate records that is consist of (eid,tin,status and some other columns are also there but i need only these three).  there is another table which is having same these three columns (eid, tin, status).
    eid and tin will be same for given combination only status will be different i.e.
    1245 23 0
    1245 23 1
    1245 23 5
    1233 33 3
    1211 24 2
    1211 24 5
    so as per above example i have to feed data into other table as
    1245 23 0
    1233 33 3
    1211 24 5
    priority of status is like 0 will be inserted if that is present in record otherwise it will be decrease from 5 to 1.
    so i have designed trigger for this which will insert data after reading each row, but it is taking around 6.5 minutes for inserting 300000 records. so is there any other way to improve performance  for this mysql program.
    DELIMITER $$
    CREATE
        /*[DEFINER = { user | CURRENT_USER }]*/
        TRIGGER `kyr_log`.`upd_status` AFTER INSERT
        ON `kyr_log`.`kyrlog_bup`
        FOR EACH ROW
        BEGIN
    DECLARE v_eid VARCHAR(28);
    DECLARE v_status INT(11);
    SELECT kyrl_eid,kyrl_status INTO v_eid,v_status FROM kyrlog_bup ORDER BY kyrl_id DESC LIMIT 1;
       IF v_eid NOT IN (SELECT kyrl_eid FROM update_status.new_status) THEN
    INSERT INTO update_status.new_status(kyrl_eid,kyrl_tin,kyrl_status)
    SELECT kyrl_eid,kyrl_tin,kyrl_status FROM kyrlog_bup ORDER BY kyrl_id DESC LIMIT 1;
       ELSE IF v_status=2 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
              UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;
    END IF;
       ELSE IF v_status=3 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
              UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;  
    END IF;
       ELSE IF v_status=4 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
               UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid; 
    END IF;
       ELSE IF v_status=5 THEN
    IF v_status > ANY (SELECT kyrl_status FROM kyrlog_bup WHERE kyrl_eid=v_eid AND kyrl_status<>0) THEN
               UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;
    END IF;
               ELSE IF v_status=0 THEN
    UPDATE update_status.new_status SET kyrl_status=v_status WHERE kyrl_eid=v_eid;            
              END IF;
           END IF;
           END IF;
           END IF;
           END IF;
           END IF;
        END;
    $$
    DELIMITER ;
    please suggest me if there is  possibility of any other solution.
    thanks

    actually you didn't have seen discussion on this link , there are many discussion related to MYSQL . and mysql is owned by oracle. so i post it here.
    thanks for suggestion

  • ORA-01417: a table may be outer joined to at most one other table

    Hi All,
    I want to display the data even if there is no corresposding data in the fac_pos table.
    when using outer joins getting error message.
    Any work around for this ? Please suggest. :-)
    SQL> SELECT case when flen.FPID is not null then
      2        'do the calculations here'
      3        else
      4        'no value in the FAC_POS table so do the ELSE PART'
      5       end CASE ,
      6       mtf.EXT_FID
      7          FROM
      8       D_F_MAP  MTF,
      9             FAC   EFAC,
    10             TRADING       EST,
    11             FAC_POS         FLEN,
    12             USERS_MAP custmap
    13       WHERE mtf.SRC_FID  = efac.FID (+)
    14         AND mtf.SRC_DID  = efac.DID  (+)
    15         AND efac.TFID = est.TFID 
    16         AND mtf.EXT_FID (+) = flen.FID              
    17         AND mtf.EXT_DID (+)  = flen.DID 
    18      AND custmap.SRC_CUST_ID   =  est.SID  (+)     
    19         AND custmap.EXT_CUST_ID  =  flen.CUSTID (+)
    20      and est.TFID =14;
    no rows selected
    SQL> SELECT case when flen.FPID is not null then
      2        'do the calculations here'
      3        else
      4          'no value in the FAC_POS table so do the ELSE PART'
      5       end CASE ,
      6       flen.CUSTID FROM TRADING EST, USERS_MAP,FAC_POS FLEN,FAC EFAC, D_F_MAP  MTF
      7  WHERE
      8   EST.SID = USERS_MAP.SRC_CUST_ID        (+) AND
      9   USERS_MAP.EXT_CUST_ID   =  flen.CUSTID (+) AND
    10   MTF.SRC_DID (+) = EFAC.DID         AND
    11   MTF.SRC_FID (+) = EFAC.FID        AND
    12   efac.TFID = est.TFID         AND
    13   mtf.EXT_FID (+) = flen.FID                 AND         
    14   mtf.EXT_DID (+)  = flen.DID     AND
    15   est.TFID =14
    16  /
    MTF.SRC_FID (+) = EFAC.FID        AND
    ERROR at line 11:
    ORA-01417: a table may be outer joined to at most one other table
    create table D_F_MAP
      SOURCE  VARCHAR2(10) not null,
      SRC_DID VARCHAR2(8) not null,
      SRC_FID VARCHAR2(10) not null,
      EXT_DID VARCHAR2(20),
      EXT_FID VARCHAR2(20)
    create table FAC
      TFID  NUMBER,
      SRC   VARCHAR2(10),
      DID   NUMBER,
      FID   NUMBER,
      CSAMT NUMBER
    create table FAC_POS
      FPID   NUMBER,
      CUSTID NUMBER,
      SRC    VARCHAR2(10),
      DID    NUMBER,
      FID    NUMBER,
      SPOS   NUMBER
    create table PASS_OVER
      TFID VARCHAR2(20) not null,
      FLG  VARCHAR2(1)
    create table TRADING
      TFID  NUMBER not null,
      SRC   VARCHAR2(10),
      TDATE DATE,
      BID   NUMBER,
      SID   NUMBER
    create table USERS_MAP
      SRC_CUST_ID VARCHAR2(8) not null,
      EXT_CUST_ID VARCHAR2(20),
      SRC         VARCHAR2(10) not null
    insert into D_F_MAP (SOURCE, SRC_DID, SRC_FID, EXT_DID, EXT_FID)
    values ('KP', '854', '7754', '101', '1202');
    insert into D_F_MAP (SOURCE, SRC_DID, SRC_FID, EXT_DID, EXT_FID)
    values ('KP', '4545', '4444', '504', '1604');
    insert into D_F_MAP (SOURCE, SRC_DID, SRC_FID, EXT_DID, EXT_FID)
    values ('KP', '7858', '9646', '604', '1705');
    insert into D_F_MAP (SOURCE, SRC_DID, SRC_FID, EXT_DID, EXT_FID)
    values ('MS', '8799', '4544', '987', '1654');
    insert into FAC (TFID, SRC, DID, FID, CSAMT)
    values (10, 'KP', 854, 7754, 85000);
    insert into FAC (TFID, SRC, DID, FID, CSAMT)
    values (11, 'KP', 854, 7754, 44000);
    insert into FAC (TFID, SRC, DID, FID, CSAMT)
    values (12, 'KP', 4545, 4444, 47000);
    insert into FAC (TFID, SRC, DID, FID, CSAMT)
    values (13, 'KP', 7858, 9646, 80000);
    insert into FAC (TFID, SRC, DID, FID, CSAMT)
    values (14, 'MS', 8799, 4544, 60000);
    insert into FAC (TFID, SRC, DID, FID, CSAMT)
    values (15, 'KP', 854, 7754, 66000);
    insert into FAC_POS (FPID, CUSTID, SRC, DID, FID, SPOS)
    values (94, 5555, 'EXT', 504, 1604, 6000);
    insert into FAC_POS (FPID, CUSTID, SRC, DID, FID, SPOS)
    values (90, 1111, 'EXT', 101, 1202, 1000);
    insert into FAC_POS (FPID, CUSTID, SRC, DID, FID, SPOS)
    values (91, 2222, 'EXT', 302, 3652, 1000);
    insert into FAC_POS (FPID, CUSTID, SRC, DID, FID, SPOS)
    values (92, 3333, 'EXT', 987, 1654, 6000);
    insert into FAC_POS (FPID, CUSTID, SRC, DID, FID, SPOS)
    values (93, 4444, 'EXT', 604, 1705, 9000);
    insert into TRADING (TFID, SRC, TDATE, BID, SID)
    values (10, 'KP', to_date('10-02-2009', 'dd-mm-yyyy'), 1548, 96751);
    insert into TRADING (TFID, SRC, TDATE, BID, SID)
    values (11, 'KP', to_date('02-02-2009', 'dd-mm-yyyy'), 5468, 7895);
    insert into TRADING (TFID, SRC, TDATE, BID, SID)
    values (12, 'KP', to_date('20-02-2009', 'dd-mm-yyyy'), 1258, 6985);
    insert into TRADING (TFID, SRC, TDATE, BID, SID)
    values (13, 'KP', to_date('22-02-2009', 'dd-mm-yyyy'), 5468, 7865);
    insert into TRADING (TFID, SRC, TDATE, BID, SID)
    values (14, 'MS', to_date('18-02-2009', 'dd-mm-yyyy'), 4669, 6893);
    insert into TRADING (TFID, SRC, TDATE, BID, SID)
    values (15, 'KP', to_date('20-02-2009', 'dd-mm-yyyy'), 1548, 6975);
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('9675', '1111', 'kp');
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('5468', '2222', 'kp');
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('6893', '3333', 'kp');
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('5468', '4444', 'kp');
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('7865', '5555', 'kp');
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('6975', '6666', 'kp');
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('6975', '7777', 'kp');
    insert into USERS_MAP (SRC_CUST_ID, EXT_CUST_ID, SRC)
    values ('6985', '8888', 'kp');Thanks.

    Hi,
    Thanks for posting the sample data in such a useful form! I'm sorry, I'm not at a database now, so I can't run it.
    What are the correct results you want from that data?
    You can outer-join to more than one table using ANSI notation.
    Another solution is to do some of the joins in a sub-query. It looks like the problem is with the est table. If you join all the tables except est in a sub-query, then you can join est to that result set in the main query.
    If you "want to display the data even if there is no corresponding data in the fac_pos table.", and fac_pos is being called flen, then you have the + signs in the wrong places.
    16         AND mtf.EXT_FID (+) = flen.FID              
    17         AND mtf.EXT_DID (+)  = flen.DID  means "display data from flen even if there is no match in mtf".

  • Lock row in 1 table while update other tables

    Gurus,
    I want to read 1 table. If the date is less than today, I want to update 4 other tables. I only want to do this update once a day.
    While the 4 other tables are being updated, I want the other web users to pause for the update while this procedure runs.
    Is there a better way to do this?
    TIA
    Steve42
    Here is what I have:
    CREATE OR REPLACE PROCEDURE TEST_TODAY2 AS
    -- to create the table
    -- create table test_today(updated_date date);
    -- insert into test_today(updated_date) values (sysdate-1);
    -- select * from test_today;
        cursor daily_update_cur is
        select updated_date from test_today
          for update of updated_date;
       last_updated_date date;
    BEGIN
      NULL;
        open daily_update_cur;
        fetch daily_update_cur into last_updated_date;
        IF  trunc(last_updated_date) < trunc(sysdate) THEN
           -- update 4 other tables
           -- After those are updated,  update test_today
           dbms_output.put_line('After updating tables');
           update test_today set updated_date=sysdate;
        ELSE
           dbms_output.put_line('Tables already up to date');
           null;
        END IF;
        execute immediate 'commit';
        close daily_update_cur;
    END TEST_TODAY2;Edited by: BluShadow on 15-Oct-2012 14:22
    Please use {noformat}{noformat} tags before and after your code as described in the FAQ: {message:id=9360002}.
    I've corrected it this time for you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Steve,
    I just checked your requirements and program. It seems fine.
    You can modify something on this. As below part is not required as it ll never happen.. :)
        ELSE
           dbms_output.put_line('Tables already up to date');
           null;
        END IF;
    /* execute immediate 'commit';  -- No need to write in dynamic sql as its not a DDL statement */
    commit;Sorry for going out of topic.
    Since I'm a NEWBIE, I just wanted to make sure that this would work before
    we roll this out to LIVE PRODUCTION.Newbie is defined on the basis of the date you joined/registered. It never asked for your experience or a screening while signing up.
    Better you can have an other idea to filter out people by their replies/sense with quality/weight of statements as newbies or experts ! .. :)
    Thanks!

  • Insert into other table from form

    Hi All,
    I have created a data block with view as a data source. I need to save the data from a form to some other table.
    I have tried using INSTEAD OF Trigger. howeverwhen I try to save, getting an error : ORA-01445 cannot select ROWID from a join view without a key-preserved table.
    I appreciate any suggestions on it.
    Thanks and Regards
    Sai

    Sorry, it looked at first as if you wanted help on the problem you encountered. After reading again your response to Zaibiman I see that you were just tricking us with the detailed explanation of the error.
    To insert into a table other than the one you queried, use the on-insert trigger.
    However, an Instead Of trigger on the view is usually the best method. If you have set the key mode, defined a primary key item and removed any references to rowid, as per Zaibiman, then it should work. You'll need your own locking method if the view uses Group By or Distinct.

  • Db-cascade-delete for other databases than Oracle?

    I have two entity beans with a one to many relationship. The database designers have implemented a cascading delete between the two tables for the entity beans. How should the deployment descriptors be written for this to work properly? From what I understand I will need to use the <cascade-delete /> tag in ejb-jar.xml and <db-cascade-delete /> in weblogic-cmp-jar.xml. However this document http://e-docs.bea.com/wls/docs81/ejb/entity.html states that <db-cascade-delete /> only works for Oracle, and I'm using DB2. Does this mean that I have to remove the cascading delete in the database and only enable it in ejb-jar.xml, or will <db-cascade-delete /> work for other databases than Oracle?
    /Björn

    To get the certified answer I'd ask a tech support rep. Unofficially, if DB2 supports cascade delete then I would expect that the EJB container will work with that. There are issues surrounding certification of features against specific databases and I'm not up on all of these so I'd check with support.

  • Is there any other table like BSEG with same fields.

    Hi Abapers,
    I want to use BSEG table.But due to some promblem BSEG table is not supporting.So is there any other table like BSEG with same fields.
    can any one help me.
    with regards

    Since performance may be an issue when hitting BSEG table
    Any of the below accounting tables can be used.
    1.BSAD
    2.BSAK
    3.BSAS
    4.BSID
    5.BSIK
    6.BSIS
    These are normal database tables, not clusters. Normally every record from BSEG can be found in one of these 6 tables. The program which selects data
    From these tables runs faster than from BSEG.
    Plz reward if helpful.
    Thanks.
    Ramya

  • My problem is very simple......firefox wont allow me save my downloads to any other location than my c drive....for example i have gone into options and set sav

    ''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/986549 /questions/986549]''
    my problem is very simple......firefox wont allow me save my downloads to any other location than my c drive....for example i have gone into options and set save downloads to my e drive....but still firefox keeps saving them to my c drive....i have 4 internal hard drives in my rig....and have tried saving downloads to them all.......why this is happening i cant understand....i have tried lots of suggestions....and have re-installed firefox multiple times

    hello, there's a general regression in firefox 27 that won't allow files to download directly into a root drive. please try to create a subfolder (like ''E:\Downloads'') and set this as default location for downloads...
    also see [https://bugzilla.mozilla.org/show_bug.cgi?id=958899 bug #958899].

  • How can I create a filter that automatically copies sent items to other folder than "sent" folder?

    I tried to create filter which automatically copies sent to different recipients messages to other folder than "sent". I tried many times with different setting but it doesn't work. With inbox messages it works fine.
    Thank you

    If you want to 'reply' to an email, but you want the sent reply to auto appear in the same folder of the message you are replying to.
    Tools > Account Settings > Copies & folders for the mail account
    There is a checkbox to select: 'Place replies on the folder of the message being replied to'
    then click on OK to save changes.
    If you want all sent emails not just replies to got to different fodlers based on who you sent the email to, then you would need to create a filter which when manually run moves selected emails to specific folders.
    So let the sent emails get auto stored in Sent folder.
    Tools > Message Filter
    click on New
    give filter suitable name
    Apply filter when: manually run
    select 'match all of the following'
    To is email address
    Perform these actions
    Move message to and select the folder.
    Do not enable.
    When you need to run this filter,
    open Message filter.
    enable only the filters you require
    Run selected filters on: Sent folder on the mail account
    click on 'run now'
    Best used when you have several sent emails which you need moving.
    Not exactly what you are looking for, but works if organising loads of sent emails.

  • How to connect my iPad 2 to Sony Bavaria wirless? Any other way than apple tv?

    How to connect my iPad 2 to Sony Bavaria wirless? Any other way than apple tv?

    http://store.apple.com/us/product/MD098ZM/A/apple-digital-av-adapter
    this one? if i connect it to the tv, will it work  if audio system is connected to the tv?

  • Displaying filed value or other table filed in ALV output table

    Hi,
      I have a vendor leadger report displaying vendor balance statement witj all line item details,  all data is present in One final table  this final table i hvae shown in output but along with this  in the first line in output  i want to display openig balance of that vendor  and in the last line i want to display closing balance of that vendor in the period for opening balance and closing balabce i have that amount in the diffrent tables or fileds  how to display that amount in output along with my Final table .
    regards,
    zafar

    hi ,
        Do this way 
    1) get the opening balance  
    2)   append that line to final table
    3) then append data from other table in final table where data for all line item
    4) then again get closing balance
    5) append that data in final table and you will get first line as opening balance ,then middle data and last closing data .
    regards
    Deepak .

  • How can i download an app from iTunes store, that exists just in a "swiss store". Because my account isn't allowed to download apps from other stores than a slovene. ???

    how can i download an app from iTunes store, that exists just in a "swiss store". Because my account isn't allowed to download apps from other stores than a slovene. ???

    You have to be in a country, and have a billing address in that country, to download from its store. You can try requesting that the app be added to the Slovenia store, but unless the app's developer/rights-holder agrees to it then Apple won't be able to sell it there : http://www.apple.com/feedback/itunes.html

  • How to Restore deleted records in other table in oracle database 10g...

    Hi All,
    i want to restore deleted records of a particular table in other table
    suppose:
    i perform a query
    delete from emp
    where deptno =30;
    now i wont to restore deptno=30 records in other table, let say in emp1 table
    can any one let me know how to do it?
    Thanks..

    This is what flashback query is for:
    orclz> conn scott/tiger
    Connected.
    orclz> select count(*) from emp;
      COUNT(*)
            14
    orclz> delete from emp where deptno=30;
    6 rows deleted.
    orclz> commit;
    Commit complete.
    orclz> create table deleted30 as select * from emp as of timestamp(systimestamp - 5/1440) where deptno=30;
    Table created.
    orclz> select count(*) from deleted30;
      COUNT(*)
             6
    orclz>

Maybe you are looking for

  • Here we go again, after 7pm and Infinity 2 becomes...

    Wish I'd avoided BT now, lost faith in them. Calling support is pointless they don't listen. Utter garbage. BBC Watchdog time I guess, seeing as they keep denying theres a problem. I'm not paying for this cr@p. Latancy is 228ms, Youview and Netflix k

  • Error: "could not complete your request because it is not a valid photoshop document"

    I was working on a PSD, which was saved to my desktop, when I decided to save it for the nth time within the hour.  As I was saving it, my laptop battery died and shut down.  After I replaced the battery and rebooted, the file was missing from the de

  • Server admin doesn't display info

    I'm experiencing slow network logons for our 10.6.8 Mac Mini server (circa 2009).  I can't get server admin to display any info - the fields are blank - both logged on locally and remotely.  I looked in some logs, but don't know which ones are useful

  • Question related to query performance

    Hi Experts, Could any 1 please explain me ,when  BWA Indexes or Aggregates are created Query performance will be high because query will hit the aggregates tables, which we can see in the statistics table RSDDSTAT_DM . But now the problem is though A

  • Downgrade from Mac OS X 10.8

    Hi, When I bought my iMac it came with osx 10.7 installed, I upgraded to 10.8 via the app store but I would like to go back. Is there any way to downgrade the system, I didn't get any OS CD with my iMac when I bought it. Many thanks, Steve.