Selected Column insert, delete and updation at replication end

Hello,
In GoldenGate, is there a way to get a timestamp column at target table to get updated for some selected columns from source table only. For eg.
At source - Table Temp_Source , columns - Emp_Id (PK), Emp_Name, Department, Address
At target - Table Temp_Target, columns - Emp_Id (PK), Emp_Name, Department, Last_Update
The Last_Update column takes timestamp for last updation made at source table which is replicated at target end.
Now I just want the changes made in EMP_Id, EMP_Name , Department columns to be replicated at target table and also the Last_Update to get updated for changes made in these columns only. The changes made in Address column should not affect Last_Update at target end.
The extract or replication script for this should work for insert, update and delete scenarios for specified columns. Using COLS creates problem in insertion as it Abends the replication process.
Is there any way I can achieve this functionality??

At target end I have written the following code in Replication process -
GetUpdates
IgnoreInserts
IgnoreDeletes
Map <source table>, target <target table>, COLMAP (USEDEFAULTS, LAST_UPDATE = @IF((EMP_ID <> BEFORE.EMP_ID OR EMP_NAME <> BEFORE.EMP_NAME OR DEPT <> BEFORE.DEPT), @getenv("GGHEADER", "COMMITTIMESTAMP"),REFRESH_TIMESTAMP));
But this code entertains only the Primary Key changes i.e. EMP_ID, I want the Last_update to get updated for changes in EMP_NAME and DEPT even but not for Address column change at source end.

Similar Messages

  • Insert,  Delete and Update options in Table control

    Experts,
    I have writen code for Insert,  Delete and Update options in Table control. They are not working properly...
    can any one send the code for the above please...
    Thanks in advance..

    Hi,
    Following steps will help you.
    1.TOP-INCLUDE
    DATA: ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    DATA: ITAB2 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
    DATA: WA LIKE KNA1.
    DATA: ANT TYPE I,CUR TYPE I.
    DATA: OK_CODE TYPE SY-UCOMM.
    CONTROLS: TABCTRL TYPE TABLEVIEW USING SCREEN 100.
    IN FLOWLOGIC
    PROCESS BEFORE OUTPUT.
    LOOP AT ITAB1 CURSOR CUR WITH CONTROL TABCTRL.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE CLEAR_DATA.
    LOOP AT ITAB1.
    MODULE MOVE_DATA.
    ENDLOOP.
    ADD “OK_CODE” IN ELEMENT LIST. CLICK ON LAYOUT AND  ADD TABLE CONTROL(name it as TABCTRL) AND PUSHBUTTONS AS FOLLOWS.
    SELECT THE FIELDS FROM PROGRAM. SAVE CHECK AND ACTIVATE.
    CLICK ON FLOWLOGIC EDITOR FROM APPLICATION TOOL BAR.
    DOUBLE CLICK ON MODULE “CLEAR_DATA”.
    write the in this module as below.
    CLEAR ITAB2. REFRESH ITAB2.
    DOUBLE CLICK ON MODULE “MOVE_DATA”.
    write the code in this module as below.
    APPEND ITAB1 TO ITAB2.
    ACTIVATE PAI AND WRITE THE CODE AS BELOW.
    CASE OK_CODE.
    WHEN 'FETCH'.
    SELECT * FROM KNA1 INTO TABLE ITAB1 UP TO 20 ROWS.
    TABCTRL-LINES = SY-DBCNT.
    WHEN 'ADD'.
    GET CURSOR LINE CNT.
    CNT = TABCTRL-TOP_LINE + CNT - 1.
    CLEAR WA.
    INSERT WA INTO ITAB1 INDEX CNT.
    WHEN 'MODIFY'.
    GET CURSOR LINE CNT.
    READ TABLE ITAB2 INDEX CNT.
    LOOP AT ITAB2.
    MODIFY KNA1 FROM ITAB2.
    ENDLOOP.
    SELECT * FROM KNA1 INTO TABLE ITAB1.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    SAVE,CHECK AND ACTIVATE ALL.
    CREATE TCODE AND EXECUTE.
    contact if u hv any issues regarding this code.
    reward points,if it is useful.
    Thanks,
    Chandu.

  • Simple insert, delete and update not working after oracle 10g installation

    Hello,
    I made a new installation of Oracle 10g (10.2.0.1.0) and created a schema . Now i try to insert or update data using simple queries, but unfortunately nothing happens. I tried inserting or updating data even via sqlplus, but unfortunately the same result. Query takes infinite time to end, so i had to manually end it every time... No errors... No warnings... but takes long time... I have given all the required permissions to the schema but the same result. Can somebody help me figure out the problem?
    Tried creating a new table and the insert and delete are working fine... think the problem is with this table... Imported the rows of the table from another online database. I dont understand how this might be a problem.
    Edited by: user13333704 on Mar 15, 2011 1:26 AM

    However how do you generate awr reports and how to find the session wait?TO generate the AWR report
    sql> ?/rdbms/admin/awrrpt
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/autostat.htm#BABDHAGF
    The event column in v$session , in v$active_session_wait will show you the session wait event.What the session was actually waiting for.
    HTH
    Anand

  • Insert delete or update entry in Custom table from KONV entry changed

    Hi All,
    I have custom table ZKONV with only few required columns and should have same number of records as KONV has at any point in time.
    KONV is a cluster table so its not readable from ORACLE level. So ZKONV is created. But I dont know how to keep these both tables in sync.
    I need to perform insert delete or update entry in Custom table if insert delete or update happens on cluster table KONV from any transactions.
    As KONV is a cluster table and does not have changed time stamp I am not able to know the number of records changed in perticulat time period.
    Thanks,

    Thanks for reply,
    There is a Outside SAP system which needs to read KONV data to feed into their system, but as KONV is cluster table they are not able to read it from ORACLE level.
    To solve this we are thinking to create a transparent Z-table and will fill it with KONV and catch Update, delete or Insert statement and do same on ZKONv.
    Is this possible some how? by some database event or something....

  • 1. Force closes often when  I get on this support page. 2)  guy who installed apps used his own itunes acct. Now i cant update. I tried deleting and reinstalling but i end up paying 2xfor the same apps. 3) there are some apps which i know I installed but

    1) iPad force closes often when I get to support page
    2) guy who installed apps on iPad used his own iTunes account. Is therea way for me to update using my own account? I've tried deleting and reinstalling but I end up paying 2x for the same apps :(
    3) I also know I installed some apps on my own account but when I try to update them, the installer guy,s apple I'd comes out. Is there A way to change that?
    Thanks for helping out a newbie non- techie :))

    1) iPad force closes often when I get to support page
    Can't help you with that.
    2) guy who installed apps on iPad used his own iTunes account. Is therea way for me to update using my own account? I've tried deleting and reinstalling but I end up paying 2x for the same apps
    Who does this iPad belong to? If someone else used their account then they paid for the apps. You will need to buy and pay for apps using your own account which means that you will no longer have access to the apps installed by the other person.
    3) I also know I installed some apps on my own account but when I try to update them, the installer guy,s apple I'd comes out. Is there A way to change that?
    If this iPad belongs to you I suggest you reset the iPad to factory defauts and just use it with the apps that you've paid for. You will be able to re-download the apps from the iTunes app store after the reset.
    Follow this guide to reset the iPad to factory settings.
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Restore-An-iPad-To-Factory-Default .htm

  • Deleting and updating records in a database table

    dear all ,
    i have created a databse table to which i have to update and delete records thru my program whixh i am unable to do so plz help me.

    Hi Sonu,
    To delete and update the records in your database table, you can create a Function Group and all the necessary function modules for it. This will a good approach as this will separate the database interface logic and the business logic. You need to use the DELETE and UPDATE ABAP keywords to delete and update the records of the database tables. Have a look at the ABAP Keyword documentation for a complete details of the usage.
    Have a look at the following link:
    DELETE
    http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3aef358411d1829f0000e829fbfe/frameset.htm
    UPDATE
    http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3aef358411d1829f0000e829fbfe/frameset.htm
    Hope this will help.
    Thanks,
    Samantak.

  • How can I  delete and update records using where conditions?

    I want to delete and update the coherence records with some conditions, I describe it to use SQL as follows:
    delete from "contacts" where getStreet() = "dsada";
    update contacts set getStreet() = "dddd" where getCity() = "ssss";
    Can I use the filter like query to achieve this requirement as follows:
    ValueExtractor::View vHomeStateExtractor = ChainedExtractor::create(
    ChainedExtractor::createExtractors("getHomeAddress.getState"));
    Object::View voStateName = String::create("MA");
    Set::View setResults = hCache->entrySet(
    EqualsFilter::create(vHomeStateExtractor, voStateName));
    I know I can use get and put to achieve this requirement , but it Requires a two-interaction between the client and coherence server. Does it have And another way?
    Thanks very much, and please Forgive my English is not very good.

    Hi,
    You have a couple of options for updating or deleting using a Filter.
    For deleting you can use an Entry Processor and the cache invokeAll method. Using "out of the box" Coherence you can use the ConditionalRemove entry processor. I'm a Java person so the C++ below might not be exactly right but you should get the idea.
    ValueExtractor::View vHomeStateExtractor = ChainedExtractor::create(
    ChainedExtractor::createExtractors("getHomeAddress.getState"));
    Object::View voStateName = String::create("MA");
    hCache->invokeAll(EqualsFilter::create(vHomeStateExtractor, voStateName),
    ConditionalRemove::create(AlwaysFilter.getInstance());For update you would either need to write custom Entry Processor implementations that perform the updates you require or you can use out of the box POF or Reflection ValueUpdaters that update specific fields of the entries in the cache. These valueUpdaters would be wrapped in an UpdaterProcessor so the call would be very similar to the code above.
    JK

  • Tell me creation ,deleted and updates of dropdownbyindex

    hi
    my name is praveen
    my question iam designing a form related to webdynpro
    in that iam creating two dropdownbyindex in that
    1.userid2.Material id
    sub: i require code samples and binding
    i have to select the items form those and
    1button:insert
    2button:Retrieve
    3buttton:delete
    4thbutton:update
    i have to click those buttons so that i can display in smae page in same table those upadates.
    please tell me my questin to answer very immediately
    because we are facing about code samples

    Hi Praveen,
    Go to layout of the view Create dropdownbyindexUI element
    Create a node_userid having the attribute user_id and bind that attribute to texts property of the dropdown
    write this code in doinit to populate values to the node
    If all user ids are in an vector userid_vec
    for (int i =  0; i <userid_vec.size; ++i)
        IPrivateApplicationView.Inode_useridElement element = wdContext.createnode_useridElement();
        element.setAtt1(userid_vec.ElementAt(i));
        wdContext.nodenode_userid().addElement(element);
    bind an action to property onSelect. you can access the index of the selected element in the event handler in implementation
    wdContext.nodenode_userid().getLeadSelection();
    Link the onAction property of button to an action
    Create an element of the node to which you should add these values
    IPrivate<view name>.I<node name>Element element = wdContext.create<node name>Element();
    element.set<attribute name>(wdContext.nodenode_userid().getElementAt(wdContext.nodenode_userid().getElementAt(wdContext.nodenode_userid().getLeadSelection()).getAttributeValue(" user_id").toString());));
    wdContext.node<node name>().addElement(element);
    Like this for deleting you can loopthrough the node from which you have to delete and identify the element
    int index = 0;
    for(int i = 0;i<wdContext.node<node name>().size;i++)
    wdContext.node<node name>().get<node name>Elementat(i).getAttributevalue("user_id").equals(<Selected element>)
    index = i;
    Once you get the element you can remove it from table
    wdContext.node<node name>().removeElement(wdContext.node<node name>().get<node name>ElementAt(index)
    For update you once you get the index you can go to the element and modify it
    What do you mean by retreiving the element?
    Hope this helps you
    Regards
    Rohit

  • Error when adding columns to table and update sync group schema

    Hi,
    I have an Azure SQL Database that is synced to five lokal SQL Server Express 2012 clients. Today I had to add some columns to the tables, I did this using SMMS and ALTER TABLE on the hub-database.
    Then I disabled auto-sync in the Azure Portal and updated the sync schema.
    The first error I got when clicking on Save-Button was that my goup is not ready for syncing. I assumed that was caused by two sync agents who were offline. So I deleted them from the group and the error was gone. (is this an generall issue that all agents
    must be online to update the schema?)
    But then I got the next error when clicking on Save-Button who tells me SQL Error 207, invalid column name on the new columns I've added. 
    Here's the error in the eventlog:
    id:DbProvider_SqlSyncScopeProvisioning_Error, rId:, sId:cc009538-29a6-4980-8db6-98fe520626b6, agentId:cb734c59-3484-41ed-8002-dec8cf7e21b4,
    agentInstanceId:1aa5a36e-0dfb-4ff1-841a-c298d2e77fe7, syncGroupId:9d439cdd-de14-4e4d-a799-8a7fa518f533, syncGroupMemberId:dd2d6cdf-fdb3-4ff8-8ab5-8e639c35af47, hubDbId:d5c5615a-6f55-484a-8c76-cf335989fa41, tracingId:b5f0eb23-1ade-437b-af33-a1960ebd1c23, databaseId:a9c5ba71-a7b0-4ffe-ab8d-10b6006fc282,
    sqlAzureActivityId:00000000-0000-0000-0000-000000000000, e:'Type=System.Data.SqlClient.SqlException,Message=Ungültiger Spaltenname &apos;Kunde_Name&apos;.
    Ungültiger Spaltenname &apos;Rechnung_gestellt&apos;.
    Ungültiger Spaltenname &apos;Rechnung_bezahlt&apos;.
    Ungültiger Spaltenname &apos;Kunde_Name&apos;.
    Ungültiger Spaltenname &apos;Rechnung_gestellt&apos;.
    Ungültiger Spaltenname &apos;Rechnung_bezahlt&apos;.,Source=.Net SqlClient Data Provider,StackTrace=
      bei System.Data.SqlClient.SqlConnection.OnError(SqlException exception&#44; Boolean breakConnection&#44; Action`1 wrapCloseInAction)
       bei System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception&#44; Boolean
    breakConnection&#44; Action`1 wrapCloseInAction)
       bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj&#44;
    Boolean callerHasConnectionLock&#44; Boolean asyncClose)
       bei System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior&#44; SqlCommand cmdHandler&#44;
    SqlDataReader dataStream&#44; BulkCopySimpleResultSet bulkCopyHandler&#44; TdsParserStateObject stateObj&#44; Boolean&amp; dataReady)
       bei System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName&#44; Boolean
    async&#44; Int32 timeout&#44; Boolean asyncWrite)
       bei System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion&#44;
    String methodName&#44; Boolean sendToPipe&#44; Int32 timeout&#44; Boolean asyncWrite)
       bei System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       bei Microsoft.Synchronization.Data.SqlServer.SqlSyncTrackingTableHelper.UpdateTrackingTableWhereColumnsNotNullInBaseTable(SqlConnection
    connection&#44; SqlTransaction transaction&#44; DbSyncColumnDescription[] addedColumns&#44; DbSyncColumnDescription[] modifiedColumns&#44; Int32 tableObjectId&#44; SqlSyncMarkerTableHelper markerHelper)
       bei Microsoft.Synchronization.Data.SqlServer.SqlSyncTableProvisioning.ReApply(SqlTransaction
    trans&#44; SqlSyncProviderAdapterConfiguration oldConfiguration)
       bei Microsoft.Synchronization.Data.SqlServer.SqlSyncScopeProvisioning.ReApplyScope(SqlConnection
    connection)
       bei Microsoft.Synchronization.Data.SqlServer.SqlSyncScopeProvisioning.ReApplyInternal(SqlConnection
    connection)
       bei Microsoft.Synchronization.Data.SqlServer.SqlSyncScopeProvisioning.ReApply(),', eType:'Type=System.Data.SqlClient.SqlException',
    eMessage:'Message=Ungültiger Spaltenname &apos;Kunde_Name&apos;.
    Ungültiger Spaltenname &apos;Rechnung_gestellt&apos;.
    Ungültiger Spaltenname &apos;Rechnung_bezahlt&apos;.
    Ungültiger Spaltenname &apos;Kunde_Name&apos;.
    Ungültiger Spaltenname &apos;Rechnung_gestellt&apos;.
    Ungültiger Spaltenname &apos;Rechnung_bezahlt&apos;.' Error Code: -2146232060 - SqlError Number:207,
    Message: Ungültiger Spaltenname &apos;Kunde_Name&apos;.. SqlError Number:207, Message: Ungültiger Spaltenname &apos;Rechnung_gestellt&apos;.. SqlError Number:207, Message: Ungültiger Spaltenname &apos;Rechnung_bezahlt&apos;.. SqlError
    Number:207, Message: Ungültiger Spaltenname &apos;Kunde_Name&apos;.. SqlError Number:207, Message: Ungültiger Spaltenname &apos;Rechnung_gestellt&apos;.. SqlError Number:207, Message: Ungültiger Spaltenname &apos;Rechnung_bezahlt&apos;..
    , eTypeInner:, eMessageInner:
    Can anyone help here?
    Kind
    regards,
    selmiac

    Hello,
    When you alter the table on hub database, did you specify the new column allow NULLs or have a DEFAULT? The column must allow NULLs or have a DEFAULT for the user to create it in the other tables on the sync group.
    Reference:Add or remove a column in a sync group
    If the issue persists, you may try to delete the sync group and recreate the group.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Read-through/write-behind and queued deletes (and updates)

    Hi,
    If I am changing the state of objects in a cache and using the write-behind and read-through mechanism what happens when I have deleted or updated an object in the cache but the change has not yet been committed to the database?.
    If I delete and object in the cache and the delete DB operation is being queued and during this time try and perform a get against the key for the object is the value read through from the database or is it ignored since the database delete is pending?
    For updates I presume that the value in the cache will be used - as the value exists in the cache and a read-through from the database will not be triggered.
    Can you clarify the behavior of Coherence under these circumstances, particularly that of a pending delete.
    Thanks,
    Dave

    Hi Dave,
    If I am changing the state of objects in a cache and
    using the write-behind and read-through mechanism
    what happens when I have deleted or updated an object
    in the cache but the change has not yet been
    committed to the database?.
    If I delete and object in the cache and the delete DB
    operation is being queued and during this time try
    and perform a get against the key for the object is
    the value read through from the database or is it
    ignored since the database delete is pending?I seem to remember a forum post mentioning that the removes from a write-behind cache are performed synchronously (they are done as part of the backingMap.remove(key)) operation so even if there are were pending updates in the write-behind queue. If I remember correctly, then the above mentioned problem cannot happen.
    >
    For updates I presume that the value in the cache
    will be used - as the value exists in the cache and a
    read-through from the database will not be
    triggered.
    Exactly.
    Best regards,
    Robert

  • One submit button - Insert Record and Update Record

    I have a form in Dreamweaver CS3, using ASP VBScript and an
    Access database. When submitted, the form inserts a record into the
    table CountDate01. The record comes from a hidden field that gets
    its value from a field within that same table. There is no other
    data entered by the user in any other form fields. The info the
    form submits comes from: rsDate1Avail.Fields.Item("Date01").Value
    I would like if the same Submit button could also update a
    record in a second table (registrants) at the same time. I would
    like to submit the same info that comes from the hidden field to
    the second table. So it would be two actions occurring that both
    insert and update in 2 different tables from one submit button. Is
    this possible?
    Here is the code for the existing form action:
    <%
    If (CStr(Request("MM_insert")) = "submitDate1") Then
    If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_MumConn_STRING
    MM_editCmd.CommandText = "INSERT INTO CountDate01 (Date01)
    VALUES (?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append
    MM_editCmd.CreateParameter("param1", 135, 1, -1,
    MM_IIF(Request.Form("hiddenField"), Request.Form("hiddenField"),
    null)) ' adDBTimeStamp
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "form_FT_4.asp"
    If (Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0)
    Then
    MM_editRedirectUrl = MM_editRedirectUrl & "?" &
    Request.QueryString
    Else
    MM_editRedirectUrl = MM_editRedirectUrl & "&" &
    Request.QueryString
    End If
    End If
    Response.Redirect(MM_editRedirectUrl)
    End If
    End If
    %>

    >I have a form in Dreamweaver CS3, using ASP VBScript and
    an Access
    >database.
    > When submitted, the form inserts a record into the table
    CountDate01. The
    > record comes from a hidden field that gets its value
    from a field within
    > that
    > same table. There is no other data entered by the user
    in any other form
    > fields. The info the form submits comes from:
    > rsDate1Avail.Fields.Item("Date01").Value
    >
    > I would like if the same Submit button could also update
    a record in a
    > second
    > table (registrants) at the same time. I would like to
    submit the same info
    > that
    > comes from the hidden field to the second table. So it
    would be two
    > actions
    > occurring that both insert and update in 2 different
    tables from one
    > submit
    > button. Is this possible?
    Yes. Use a command on the redirect page to update the data.
    No, wait, the
    ASP COMMAND IMPLEMENTATION IS BROKEN IN CS3, and remains
    broken in CS4. So
    sorry, you'll have to hand-code it.
    Sorry, I'm just a little bit bitter about the callous
    attitude Adobe has
    shown in fixing the KNOWN BUGS IN THEIR SOFTWARE.

  • Delete and update records in Stored procedures

    I AM NOW STUDYING A STORED PROCEDURE ,AND I ENCOUNTER SOME PROBLEM WITH
    UPDATE AND DELETE SOME RECORD WHICH ONE IS UPDATED OR DELETED,
    THIS IS MY CODE:
    PACKAGE table_of_array IS
    type emp_rec is record(
         empno emp.empno%type,
         ename emp.ename%type,
         sal          emp.sal%type,
         deptno emp.deptno%type
    type arr is table of emp_rec
    index by binary_integer;
    procedure get_data(a in out table_of_array.arr);
    procedure do_insert(a in out table_of_array.arr);
    procedure do_update(a in out table_of_array.arr);
    procedure do_delete(a in out table_of_array.arr);
    END;
    PACKAGE BODY table_of_array IS
    procedure get_data(a in out table_of_array.arr)
    is
    i number:=0;
    begin
         for cur in (select empno,ename,sal,deptno from emp) loop
              a(i):=cur;
              i:=i+1;     
         end loop;
    end;
    procedure do_insert(a in out table_of_array.arr)
    is
         i number:=0;
         cnt number:=a.count;
    begin
         for i in 1..cnt loop
              insert into emp(empno,ename,sal,deptno)
              values(a(i).empno,a(i).ename,a(i).sal,a(i).deptno);
         end loop;
    end;
    procedure do_update(a in out table_of_array.arr)
    is
    begin
         /* WHICH RECORD AND ITEM HAD BEEN UPDATED */
    end;
         procedure do_delete(a in out table_of_array.arr)
         is
         begin
         /* WHICH RECORD HAD BEEN DELETED */      
         end;
    END;

    when you want to update, delete or insert records with a stored procedure you have to provide a procedure that locks the records
    i'll send you an example of an update procedure and a lock procedure
    PROCEDURE p_upd_devices ( resultset IN devtab) IS
    BEGIN
    FOR i IN 1..resultset.COUNT LOOP
              IF resultset(i).zone <> resultset(i).zone_ref THEN
              p_update_zone(resultset(i).zone, resultset(i).mdv_seq);
              END IF;
         END LOOP;
    EXCEPTION WHEN OTHERS THEN
    mecoms_general.logging(0, sqlerrm, 'pck$fill_error_devices.p_upd_devices');
    END; -- p_upd_devices
    PROCEDURE p_update_zone (pi_zone in metering_devices.zne_code%type, pi_device in metering_devices.seq%type) IS
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
              UPDATE metering_devices
                   SET zne_code = pi_zone
                   WHERE seq = pi_device;
                   commit;
    EXCEPTION WHEN OTHERS THEN
    mecoms_general.logging(0, sqlerrm, 'pck$fill_error_devices.p_update_zone');
    END;
    PROCEDURE p_lock_devices( resultset IN OUT devtab) IS
    BEGIN
    null;
    END;

  • Selecting from one table and Update another in the same Page

    Could someone help me with this HTMLDB task. In my page design, I am selecting data from two tables (masters: DEPT, EMP) which I want to display on the left column of the page and at the same time a user would be able to update another table (ATTENDANCE:with many children) which would have a radiogroup on the right side for each value of the master such as employee name. The placement of data has to appear in corresponding rows on the page. For instance, employee names of the master table must appear on the same row with its corresponding child value. The page would be grouped by DEPT_NO. The user would click on the department name, a new page with the employee name would apprar. From that page, the user would then update attendance column for each employee in that department. In this operation, it is only the ATTENDANCE table that is being updated. I can send out more information about the structure of the tables if you need more information. I tried many HTMLDB options, forms, reports, etc. I have not been able to get quite right. Your help will be appreciated.

    Raju,
    Thanks for responding to my problem. I have actually tried using the example on how-to you sent me a link to but it did not help as I expected. You see, the page would be updated every meeting date for each employee. I can send you more information about the table structure if you like. However, let me see if this will help you a bit.
    Tables are: 1) Dept [dept_no (pk),dept_name] 2) EMP [emp_no (pk),emp_name, dept_no(fk)] 3) Meetings [meet_key(pk),attended, meeting_date, emp_no(fk)]
    What I want to do is create two pages, one would list the departments, when a user selects a department, the user would be linked to a meeting attandance page. The meeting attendance page would list department name once, Meeting date once, and then list employees in that department. At the right column of every employee would be a checkbox for meeting.attended for update. The meeting_date would be pre-populated so that what the user would do is just check Yes/NO. The second page is the one I'm having the most problem with.
    If I can do a fetch from dept, emp, and meetings and then do an update on the Meetings table on the same page, I think that might solve the problem. That was how I solved it in MS Access three years ago.
    Here is email address in case you want to contact me directly. [email protected]
    Thanks again for your help.

  • Deleting and updating database table

    hi all,
    i have to update the database table based on my internal table(both having same structure).
    my database has 2 records having a key field 1 and 2 respectively.(2 records)
    and my internal table has records with key fields 3, 4 and 5 respectively(3 records) .
    i want to delete all data from database table first..
    then i want to insert all the three records in the database table..
    finally i want my database to have 3 records with key fields 3, 4 and 5 respectively that are in the internal table
    what should be the correct way?

    Hi ,
    to delete all the records from dbtab
    DELETE dbtab.
    to update the database by using internal table
    -MODIFY dbtab       FROM TABLE itab.
    but as per my knowledge structures of internal table and database table should be same
    if the database table is a Ztable please change the structure of database table as you said
    Put fields 3,4and 5 as key fields
    Thanks & Regards,
    Sateesh.

  • Delete and update contents in a CSV File

    Hi All,
    I am new to java . I am able to read the records from CSV file using BufferedReader and I am getting output like this
    "100,a100,1b100" -->1st record
    "200,b200,dc300" -->2nd record
    "400,f344,ce888" -->3rd record.
    Now I need some help in below requirements.
    1.How to delete a specfic record?
    2.If record already exists how to update the existing record with new values?
    Please share your ideas or give me some code snippet..
    Thanks in Advance

    Or if each record is the same length and you are not inserting -
    just modifying values in existing ones - you can use a
    RandomAccess file.
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/RandomAccessFile.html

Maybe you are looking for