How to perform UPDATE/INSERT

Hi,
How can i perform update/insert we do in OWB, which insert records if they are not available in target and updates them if they already exists.
I am now using IKM Oracle Incremental Update(MERGE)
but i am getting some error while execute
VSG

Here is the error.
com.sunopsis.core.SnpsInexistantObjectException: There is no connection for this logical schema/context pair:RDDM_LOGICAL / STGDW_LOGICAL
     at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContext(SnpConnect.java)
     at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java)
     at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst(SnpSession.java)
     at com.sunopsis.dwg.dbobj.SnpSession.getConLst(SnpSession.java)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
     at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.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(Unknown Source)

Similar Messages

  • Using datasources: How to manage transactions when perform. update/insert?

    I've been trying to find information on how datasources manage transacctions but I've been unable to find much information. I've read that for XA datasources you dont have to commit, save and rollback manually, but how are transactions managed for non-XA datasouces?+ I've only seen examples with select statements, such as in the example on this page [this page|http://developers.sun.com/jscreator/reference/techart/2/jdbc.html], but I've never seen a working example with insert and updates.
    Can anyone point me to some examples?*
    Also, when I use the DriverManager instead of the DataSource for doing updates/inserts I use the setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE) method. Can that be used with datasources?+
    Thank you <img class="emoticon" src="images/emoticons/laugh.gif" border="0" alt="" />

    If you are using a connection pool, how are you guaranteeing that you are using the same connection throughout the same application? Look at the following:
    1) You grab a connection from the pool
    2) You call procedure A
    3) You call procedure B and issue rollback in procedure
    4) You call procedure C
    5) You close your connection
    Are you saying you made changes in procedure A and when you issued a hard rollback in procedure B, the changes in A were not rolled back?
    I'm guessing the problem is that you are not issuing your statements using the same connection.

  • * * Procedure needs a way to  perform  update, insert or delete to...

    Hi Gurus,
    I got Assignment & need your help how to write this procedure efficiently.
    ** The procedure needs a way to actually perform the update, insert or delete to bring the reference data up-to-date with the refresh table.**These columns are for internal use and should not be compared to the refresh tables.
    Column 1
    Column 4
    Column 5
    Column 7
    Column 9
    Column 12
    Column 22
    Column 24
    1)     I would list out the columns in the cursors in place of the *. Or better define a record with %ROWTYPE.
    2)     You will need to include a way to look for rows that may be in one table and not the other.
    a.     Insert the rows that exist in the refresh table, but are missing from the reference table.
    b.     Delete the rows that are found in the reference table, but do not appear in the refresh table.
    3)     You also need to provide for handling the expiration date. Our default expiration date is ‘01-JAN-2500’, meaning if the refresh table has a futuristic expiration date or null, then our default expiration date is considered valid. Also this date needs to be added to any new rows created as a result of the refresh, if you leave the EXPIRATION_DATE column out of the insert it should default to the above date.
    4)     I assume that Differences is where you plan to list the actual data values that differ. If you don’t list the whole row I would at least list the primary key, in addition to what columns are different.
    5)     The procedure needs a way to actually perform the update, insert or delete to bring the reference data up-to-date with the refresh table.
    Thanks in advance

    Hi,
    Take a look at merge
    http://www.psoug.org/reference/merge.html
    Keep Smiling
    Bob R

  • How do I update/insert into a target table, rows after date X

    Hi all
    I have a mapping from source table A to target table B. Identical table structure.
    Target table A updates rows and inserts rows daily. Every week I want to synchronize this with table B.
    I have CREATION_DATE and LAST_UPDATE_DATE on both tables. I want to pass in a parameter to this mapping of date X which tells the mapping:
    "if CREATION_DATE is past X then do an insert of this row in B, if LAST_UPDATE_DATE is past X then do an update of this row in B"
    Please can you help me work out how to map this correctly as I am new to OWB.
    Many thanks
    Adi

    Hi,
    You can achieve this by -
    1. Create a control table, say Control_Table, with structure
    Map Name, last_load_date. Populate this table with the mappings that synchronizes your Table B.
    2. Alter mapping, that loads Table B to use the above control table to get all the records from Table A, you have to join Table A and Control_Table with the condition -
    Control_Table.Map_Name = < mapping name>
    AND ( TableA.Creation_Date > Control_Table.last_load_date
    OR TableA.Last_Update_Date > Control_Table.last_load_date )
    3. Then use UPDATE/INSERT on the Table B based on the Keys. This should take care of INSERT ( if not present) / UPDATE (if the row already exists).
    4. Schedule the mapping to run on weekly basis.
    5. You have to maintain the Control_Table to keep changing the values for Last_Load_Date to pick the data since the last time Table B is synchronized.
    HTH
    Mahesh

  • Unable to perform update/insert queries on ACCESS db

    Hi,
    I've configured my odbc (Access driver). I'm using user dsn. The dsn created is "Fitnet". Below are the source code.
    I am able to execute SELECT queries by using statment.executequery , but when I try to execute an update or insert query using statment.executeUpdate I get an exeption from the driver "Tow few parameters expected 3 "
    What is wrong , do I nead to configure any thing sprciasl on my ODBC ??
    Please raplay also to [email protected]
    or [email protected]
    Thanks Shahar.
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    String url = "jdbc:odbc:Fitnet";
    Connection con= DriverManager.getConnection(url,"","");

    HI
    I have a class called main maneger that performes the query the code is :
    public void ExecuteUpdateQuery(Query query) {
    try {
    log.writeDebugMessage("Before executing query");
    log.writeDebugMessage("Executing : " + query.getQuery());
    stmt.executeUpdate(query.getQuery());
    log.writeDebugMessage("After executing query");
    } catch(SQLException e) {
    System.out.println(e.getSQLState() +" " + e.getMessage());
    log.writeException(e);
    The querie itself is (this is a constractore that creates the query :
    public AddTraineeQuery(Trainee Trainee) {
    DateFormat dF = DateFormat.getDateInstance();
    query = "INSERT INTO Trainee(Trainee_Id , Trainee_password , Trainee_Address, Trainee_Name , Trainee_Phone , Trainee_Gender , Trainee_SessionTime , Trainee_Purpose , Trainee_HealthStatus , Trainee_StartDate , Trainee_Birthday) VALUES (" +
    Trainee.getUserId() + ',' +
    '"' + Trainee.getUserPassword()+ '"' +',' +
    '"' + Trainee.getUserAddress() + '"' + ',' +
    '"' + Trainee.getUserName() + '"' + ',' +
    Trainee.getUserPhoneNumber() + ',' +
    Trainee.getUserGender() + ',' +
    Trainee.getTraineeSessionTime() + ',' +
    Trainee.getTraineeTrainingPurpose() + ',' +
    Trainee.getTraineeHealthStatus() + ',' + '"' +
    dF.format(Trainee.getUserStartDate()).toString() + '"' + ',' + '"' +
    dF.format(Trainee.getUserBirthDay()) .toString() + '"' + ')';
    When I look at the log output I see :
    INSERT INTO Trainee(Trainee_Id , Trainee_password , Trainee_Address, Trainee_Name , Trainee_Phone , Trainee_Gender , Trainee_SessionTime , Trainee_Purpose , Trainee_HealthStatus , Trainee_StartDate , Trainee_Birthday) VALUES (6,"333","hhhh","rafi",048231821,true,63,4,true,"Feb 22, 2002","Feb 22, 2002")
    and I get the eror
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 4.
    P.S when I copy and the query from the log into access db it works
    Thanks

  • How to perform update in pl/sql

    hi buddies,
    would like to know how can i perform an update statement as a part of my function.
    i need to trim a column
    and that has to be updated in the database.
    pls advice.
    thanks in advance

    Hi Alagu,
    Please understand that I know nothing of your code or application.
    Therefore try to be as clear and detailed as possible.
    From what I can make of your description:
    1) you're storing emails and/or emailaddresses into the database?
    ( how are you accomplishing that at the moment?)
    2) you want to trim the data
    Trimming the data can be done in various ways.
    F.i. using trim, but maybe a regular expression could come in handy as well...
    Can you provide some sample code, some sample data and a create table description and your database version?
    Because: without knowing at least the datatypes, the columns, how it works we can't say much useful.

  • How to fetch,update,insert the data using database link on diff. servers

    I am using two oracle server.
    1st) Oracle 9i ( Server1 )
    2nd) Oracle 10g ( Server2 )
    3) Forms 6i
    I have created a database link on Server 1 for connecting to Server 2.
    I written a piece of code which will be executed in Forms 6i and is connected to Server1.
    The piece of code brings the data from SErver2 via cursor and I try to insert / update the relevant records
    in my Server1 database users.
    The Insert/Update runs sucessfully but at the time of commit I get the following errors
    in Forms ORA-01041:internal error. hostdef does not exist.
    Then it forcefully rollback the data and come out of the application.
    contact :email-id : [email protected]

    Suggest you test your code from sqlplus before running from forms.
    Start by testing a simple "select sysdate from dual@<database link>;" then test select from application_table@<database link> then test the insert/update code. After it works from sqlplus, then try it from forms.

  • How to perform Update operation in Ios using Odata Services

    Hello,
          I want to do PUT(update) operation on odataservice... I am using followin code to get the proper Entry property to update
    SDMODataEntry * entry1=((SDMODataEntry *)[ArraySelectedCell objectAtIndex:0]);
        SDMODataPropertyValueObject* obj = ((SDMODataPropertyValueObject*)[entry1getPropertyValueByPath:@"rm_comment"]);
    But i am getting following error
    __NSDictionaryM getPropertyValueByPath:]: unrecognized selector sent to instance 0x10166620
    Please help...
    Regards,
    Ravindra

    Ravindra Dolas
    Can you please look at this thread SMP 3.0 - OData CRUD Help
    I hope you will get some inputs.
    Rgrds,
    Jitendra

  • MULTIPLE UPDATES/INSERTIONS TO THE SAME TABLE

    How can I update/insert mutiple rows into the same table from one form ?

    Hi,
    Using the portal form on table you can insert only a single row. You can use master-detail form to insert multiple rows.
    Thanks,
    Sharmila

  • How to perform auto update in staging database using warehouse builder ?

    Hi ,
    here our client requirement is?
    our client want to transfer data from their production database to staging database using warehouse builder.and also what ever the update occur in production database
    that must be reflected in staging database.
    here we are transfering data from product-db to staging using etl(maping--insert/update operator )
    it is transfering fine.but it is not automaticaly updating in staging db with new update in production database?
    can any body give me the details how to achive it.
    Thanks & regards,
    k azamtulla khan.

    Hi,
    firstly there are two threads for the same issue from youself(excluding this one) which is a waste of others time so kindly refrain from doing so and use one thread.
    OWB: how can automatic updation  perform in staging database using OWB
    OWB: how to use insert/update table operator for target table
    secondly, with regards to the options , here are some options:
    1. Use trigger for update.
    2. Use materialized view(refresh on commit)
    3. Use oracle advance queing mechanism (OAQ) for queing the recent inserted/updated records.
    Kindly close other threads and maintain just one thread.
    Regards
    Message was edited by: Rado
    user647181

  • On submit perform an insert on one table and an update on aother table

    I am trying to perform and insert on the table one table (the wizard created my form the insert is going against the table that I created using the wizard) and on the form is on field that is also in another table. Therefore, I am trying to perform an update on one attribute of one table and a insert into another table. How do I do this in apex?

    If you have used wizard to create form, then you may see a process of type 'Automatic Row Processing (DML)' in your page which will perform INSERT/UPDATE/DELETE on your form table. Here you can see APEX performs INSERT only when REQUEST is in 'INSERT, CREATE, CREATE_AGAIN, CREATEAGAIN'
    So create one more PL/SQL page process which will execute at 'on Submit after validations' and write update process as follows
    begin
    -- pseudo table/columns
    update tbl_second
    set col1 = :p1_item
    where pk_col = :p1_pk_item;
    end;Make this process conditional so that it will perform UPDATE only when request value is in 'INSERT, CREATE, CREATE_AGAIN, CREATEAGAIN' ( i.e. only when you are inserting into your form table)
    Cheers,
    Hari
    p.s. I think you may also need to update the second table when some-one updates your form table.
    Edited by: Hari_639 on Oct 26, 2009 9:46 AM

  • How to improve performance of insert statement

    Hi all,
    How to improve performance of insert statement
    I am inserting 1lac records into table it takes around 20 min..
    Plz help.
    Thanx In Advance.

    I tried :
    SQL> create table test as select * from dba_objects;
    Table created.
    SQL> delete from test;
    3635 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    4
    SQL> insert /*+ APPEND */ into test select * from dba_objects;
    3635 rows created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    6
    Cheers, Bhupinder

  • I am currently using the original macbook air and it is running 10.5.8 since it does not have anywhere to insert a disc how do I update it to anything that is more recent than that

    I am currently using the original macbook air and it is running 10.5.8 since it does not have anywhere to insert a disc how do I update it to anything that is more recent than that

    Keep in mind you can also use the optical drive of another computer to upgrade OS X. http://support.apple.com/kb/HT2129 has information on how to do that. This works on a Windows PC as well as a Mac.

  • How to get updated by count value in database ?

    hi all,
    I created jsp page iin which insert,update,delete , query and queryall Functionalities are working...
    I need following,
    whenever i update a record i should get updated by, updated time and updated count.. to be stored in database...
    i achieved to store updated by and updated time...
    please help me how to get updated count:
    when ever a record is updated for first time updated count=1,
    for second time it should be 2 for third time it should be 3 and so onnnn
    please help me how to write this kind of function and kind of code help will be appriciated....

    if you want "number of updates" performed on each row to be persistive, you should have designed the schema with an extra field which keeps number of updates performed.
    to generic solution sql statement should have been written like
    INSERT INTO table (a,b,c,update_count) VALUES (1,2,3,4)
      ON DUPLICATE KEY UPDATE update_count=update_count+1;in this case even a insert statement will work, you wouldn't had to write another update statement.
    or if u want to use update statement only
    have an extra column "update_count" do "update_count=update_count+1" on each update statement, set initial default value to 0;
    and if u want to know how many rows have been updated
    as BalusC wrote
    BalusC wrote:
    PreparedStatement#executeUpdate() returns an int which represents the amount of affected rows.

  • Update/Insert Problem with Oracle Warehouse Builder

    Hello,
    i have update/insert problem with owb.
    Situation: I have a source-table called s_account and a target table called w_account_d. In the target table are already data which was filled trough the source table inserts. Now anyone make changes on data on the target table. This changes should now give further on the source table with an update operation. But exactly here is the problem i can´t map back the data to source because that will create a loop.
    My idea was to set a trigger but i can´t find this component in owb or is anywhere hidden?
    Also i have already seen properties as CDC or conditonal loading in the property inspector of the table, but i have no idea how it works.
    Give it other possibilities to modeling this case? or can anyone me explain how i can implement this eventually with CDC?
    I look forward for your replies :)

    Hi
    thanks for your answer. I follow your suggestion and have set the constraints of both tables into the database directly.Nevertheless it doesn´t work to begin. In the next step i found by right click on a table the listpoint "configure" - I goes to "unique key" --> creation method and set here follow options: Constraint State = ENABLE, Constraint Validation = Validate. That error message that appears before by the deployment disappears yet. Now i start the job to test if the insert/update process works right. Finally it seems to work - but not really.
    My Testscenario
    1. Load the data from source table about the staging area to data warehouse table: Check - it works!
    2. Change one data record in source table
    3. Load the source table with changed data record once again to staging area: Check - it works!
    4. Load new staging area table with the changed data record to data warehouse table: Check it works! BUT, BUT i can not recognize if it is insert or update operation, then under the design window by jobs execution windows is reported "rows selected 98", Rows inserted" is empty and "rows updated" is empty. So i think works not correct, then my opinion if it works correct it should show be "rows updated" 1.
    What can yet now still be wrong or forgotten? Any ideas?
    *By the way think not 98 rows there is not important if you make an update or insert which performance. It is an example table the right tables have million of records.*
    I look forward for your answers :)

Maybe you are looking for