Best Approach to Compare Current Data to New Data in a Record.

Which is the best approach in comparing current data to new data for every single record before making updates?
What I have is a table with 5,000 records that need to be updated every week with data from a data feed, but I dont want to update every single record week after week. I want to update only records with different data.
I can think of these options:
1) two cursors (one for current data and one for new)
2) one cursor for new data and one varray for current data
3) one cursor for new data and a select into for current data.
Thanks for your help.

I don't recommend it over merge, but in theory you could use a checksum (OWA_OPT_LOCK.checksum()) on the rows and if they differ then copy the new row into the destination table. Or you might be able to use rowscn to see if things have changed.
Like I said, I don't know that I 'd take either approach over merge, but they are options.
Gaff
Edited by: Gaff on Feb 11, 2009 3:25 PM
Actually, rowscn between 2 tables may not be an option. I know you can turn a rowscn into a time value so if that rowscn is derived from anything but the column values for the row that would foil that approach.

Similar Messages

  • How to delete the data in New data table Because...

    Hi all,
    I have an urgent issue :
    in the process chain DSO has finished a delta load with 18592 data entries transfered and added, and activated , but when I checked New data table , there are still 18592 data entries there. This will cause problem I think, because this chain has to run daily, so next run will make the data in new data table added twice, so could you pls let me know the way to delete data in new data table?
    thanks in advance

    Dear Ryan Zhang  ,
    When activation DSO will automatically clears New table and places records in active table and change log table.
    If records still exist in New table means it has not activated properly.
    Check in active table and change log table if any entries are found.
    If not ,try activation again.
    If entries are there in active table then try these
    Go to SE14
    Give the active table name..
    Click on Edit
    Click on activate and adjust database.
    Load again and try to activate.
    Hope it helps
    Regards
    Bala

  • Difference between using new Date() and new Date(System.currentTimeMillis()

    Hi All,
    I have seen many open source api's where they are updating dates with the following code
    new Date(System.currentTimeMillis())
    when i print the new Date() it prints the same
    what is the difference between using new Date() and new Date(System.currentTimeMillis()) ??
    Thanks,
    J.Kathir

    when i print the new Date() it prints the same
    It does because of backward compatability. This constructor exists in version 1.3.1 but not in newer versions.Really ? Please point me to where you read that.
    API doc 1.5 : new Date() (still there, not even deprecated)
    A quick look at the code for this constructor:    /**
         * Allocates a <code>Date</code> object and initializes it so that
         * it represents the time at which it was allocated, measured to the
         * nearest millisecond.
         * @see     java.lang.System#currentTimeMillis()
        public Date() {
            this(System.currentTimeMillis());
        }

  • Compare date from xml data to new Date() in Repeater

    Hi All
    I am using repeater and while those following 2 display the
    same
    (when reaching the current day)
    <mx:Label text="{new Date().getDate().toString()}"/>
    <mx:Label text="{r.currentItem.dayofmonth}"/>
    the following line display nothing
    <mx:Label
    visible="{r.currentItem.dayofmonth==new
    Date().getDay().toString()?
    true:false}" text="{new Date().getDate().toString()}"/>
    Why? and how can I fix this?
    mordsm

    Why is it not displaying, because of the text or because of
    the visible?
    Also, when working with repeater, I advise creating a custom
    component and repeat that. Pass in the entire currentItem on a
    public property. If you implement the property using getter/setter
    function pairs, you can debug the dataflow easily. (note, Property
    values are set on a component before its initialize or
    creationComplete events fire)
    Handlers can access the entire dataProvider item in its
    native dataType through the event.currentTarget property.

  • Data in New Data in ODS

    Hello,
    I am trying to load data from r/3 into the ODS.
    When i check in the monitor its saying that
    07:37:12 ( 549741 from 549741 Records )
    But its not turning green.Its still yellow.
    I checked the new data in the ODS. The number of entries in it is 0.

    Hi
    You can view the data in ODS only after the status is green.
    Check if it is showing any error in the description.
    If not then wait for some time. we can't do anything as is it showing yellow(in process) status
    Cheers
    SM

  • DSO activation: Data in new data table but missing in active data table?

    we use an end routine in transformation to populate a data field in DSO.
    it works as we can see the value populated in new data table.
    when we activate (activation) DSO, we see the value is deleted from this data field.
    why?
    this data field is set as an characteristic info obj in the data field portion of the DSO.
    we are using 2004s, I forget to check the SP level.
    George

    good job ,thanks for the update and good luck.
    I saw it late on this, else i never miss OSS notes
    Chetan
    @CP..

  • What is the best approach to migrate SharePoint farm from one data center to other datacenter

    We have two web front server and one application server and two instances for database server and we have to migrate complete farm from one data center to other data center with minimal downtime and end user impact.
    Please provide your best input on this.
    Thanks in advance.

    Create a new farm in the secondary Data Center at the same patch level with the desired configuration. Replicate the databases using the method of choice (Mirroring, AlwaysOn, etc.). Create a downtime window where you can then attach the databases to the
    new farm's Web Application(s)/Service Application(s).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Best approach for jtree with each node having data to be displayed in 2rows

    Hi,
    Need directions on approach for constructing a jtree.I am not sure whether this is possible in jtree.
    the format of tree will be as shown below
    +JTREE
    -JTREE
    - Name1 Age 1 Id1
    Address Details1(Should be a button)
    - Name2 Age 2 Id2
    Address Details2(Should be a button)
    Problem here is each child node has two rows.First row has three columns and second row has a button which takes user to new screen on click. Any directions on how to approach this problem will be helpful
    Thanks for your help
    Ravi

    Hi,
    Thanks for the suggestion. Will this approach work, if I have to display a button in the second row and content in the first row (Can these tworows together be given as a treenode)?
    Any sample example code will be useful.
    thanks and regards
    ravi

  • Discrepency while REPLICATING META DATA (for new DATA SOURCE) in BI side.

    In R/3 I have created a simple TRANSACTIONAL data store based on an INFO QUERY.
    I even checked the veracity of this data store using RSA3 to see whether it extracts data. Works perfectly.
    I go to BW side. Click on the SAP module under which I have created the data source, right click, select 'REPLICATE' and click on it.
    ( I would love to post the screen shot here, but I think I may not be able to paste BMP files here).
    I will write the contents of the POP-UP that appears,
    Title:Data Source from Source System Unknown
    Pop-up contents:
    Data Source (OSOA) DS_01
    does not exist in BI system
    How do you want to create the object in BI?
    1. as DataSource (RSDS)
    2. as 3.x DataSource (ISFS)
    3. this and following 3 as DataSource (RSDS)
    4. this and following 3 as 3.x DataSource (ISFS).
    Well, I normally select option three as per my instructions (without knowing the real reason).
    But sometimes, either for the same data source or for another data sources that I created, the same pop up will appear like this
    Title:Data Source from Source System Unknown
    Pop-up contents:
    Data Source (OSOA) DS_01
    does not exist in BI system
    How do you want to create the object in BI?
    1. as DataSource (RSDS)
    2. as 3.x DataSource (ISFS)
    Just TWO options.
    And, if I select option 1, the data source does not work properly on BI side, though it worked perfectly on R/3 under TRANSACTION RSA3 and showed me data.
    For some unknown reasons, if I delete the erroneous datasource on BI side and sleep overnight and comeback in the morning and replicate, the POP-UP sometimes appears with FOUR options, (Notice the word 'SOMETIMES')
    Can someone explain the secret behind this?
    Thanks again in advance,
    Gold

    3. this and following 3 as DataSource (RSDS)
    That means there are total 3 new (not yet in BI) DataSources available, u wanted to replicate as 7.0 datasource (RSRS) or 3.x datasource (ISFS).
    (other 2 datasources activated from RSA5, or created by other users under that SAP module)
    If there is 1 new DataSource, u will  get just TWO options.
    1. as DataSource (RSDS)
    2. as 3.x DataSource (ISFS)
    After replication with option 1, u should activate datasource in BI, then create infopackages, transformation, DTP etc.

  • TS1474 my PC data corrupted, new data loaded, when I try to sync my I phone, massage comes, you cannot authorize more than five computers

    After reforamatting my PC, & reloading all data. I tried to sync my I Phone to I tunes. Massage comes U can't authorize more than five computers.

    In iTunes, select iTunes Store under STORE (left panel), select your Apple ID (top right).
    Sign in and in Account Infomation, click the De-authorise All button.
    After that sign in your new computer.
    (Note: you can only do this ONCE a year)

  • Best way to show multiple copies of same data to different users

    Hi,
    I am new to configuring and using Oracle. I have an oracle db installed on a server machine and I loaded it with a set of data. I have multiple users who would all like to access the tables but they need to see unique copies of the data.
    What is my best approach? Should I create a new database instance? If so what is the best way to copy data to the new instance?
    Any help is greatly appreciated.

    Each developer should copy from the 'base' schema to his own the tables he requires to do his work. Give each developer select privileges on the 'base schema' tables so he cannot change them. This way, the developer can refresh his data as needed on his own. Public synonyms for the base schema tables will enable developers to only have to copy tables they wish to modify.
    Creating a separate fully loaded schema for each developer is going to create a never ending load of work for you as developers will be constantly asking you to refresh their schemas. Alternatively, you could create an export of production on a schedule and let the developers do the import to their schema when they wish.
    Basically, these folks are developers and, IMNSHO, should be managing their own development schemas.

  • Best approach for login security

    Hello People,
    I am quite new to JSP, so I don't know how should I secure my applications, I mean, what kind of code should I put on the JSP's that would be a good approach to make session validation, and how do I invalidate the session for timeout or if the user closes the browser.
    Could someone give examples?
    Thanks.
    []s

    It depends on what you want to do. In my current project, I need to check to make sure that a user is not only logged in to use the site, but that the user also has the privileges to execute certain functions of the webapp.
    To do this, I first created a Login bean that contains just a username and a security level as its only attributes. I also have a Db class that has all the db-related methods, which includes the method that checks the db to see whether the username/password combo is a valid record.
    Partial code to follow.
    In the home JSP, the code looks like this:
    //create cookie
    String cookieName = "CTA";
    Date now = new Date();
    Cookie c = new Cookie(cookieName, URLEncoder.encode(now.toString(), "UTF-8"));
    response.addCookie(c);
    Db d = new Db();
    //*****presentation logic here*****
    if (d.getParam(request, "login").equals("Log in")){
        String id = d.getParamValues(request, "id");
        String pw = d.getParamValues(request, "passwd");
        String level = d.login(id,pw);
        if(level != null){
            Login l = new Login(id,level);
            c.setValue(id);
            session.setAttribute("login", l);
            response.sendRedirect("search.jsp");
        }else{ %>
            <font color=red><center>Login failed.</font></center>
    <%
    } Subsequent pages has code like this:
    //get the login object from session
    Login l = (Login)session.getAttribute("login");
    //make sure user is logged in
    if (l == null)  response.sendRedirect("home.jsp");
    //make sure user has authority to view page
    String level = l.getLevel();
    //retrieve cookies
    String cookieName = "CTA";
    Cookie[] c = request.getCookies();
    Cookie CTA = null;
    if(c.length != 0){
        for(int i = 0; i < c.length; ++i){
            if(c.getName().equals(cookieName)){
    CTA = c[i];
    break;
    }//if
    }//for
    }//if
    //make sure user has permission to edit
    //only "I" level does not have permission
    if (level.equals("I")){
    %>
    <br>
    <center>Sorry, you do not have permission to edit these records.</center>
    <%

  • How to compare a given date with System date?

    The date input for me is of type String and it is in the format
    String s = "1900-00-00 00:00:00.000";
    I need a helper method that will take the above string as input and it should return Boolean value depending on the following condition.
    Date should be less than or equal to current date and greater than the date prior to the date 50 years of current date.
    Thanks in advance...

    I got it.
    String date = "3000-03-19 12:34:56.000";
    Calendar c = Calendar.getInstance();
    Calendar c1 = Calendar.getInstance();
    Calendar c2 = Calendar.getInstance();
    Date d = new Date();
    Date d1 = new Date();
    Date d2 = new Date();
    c1.set(Integer.parseInt(date.substring(0,4)),Integer.parseInt(date.substring(5,7)),Integer.parseInt(date.substring(8,10)),Integer.parseInt(date.substring(11,13)),Integer.parseInt(date.substring(14,16)),Integer.parseInt(date.substring(17,19)));
    c2.set(1,c.get(1)-125);
    d = c.getTime();
    d1 = c1.getTime();
    d2 = c2.getTime();
    System.out.println(d1.compareTo(d));
    System.out.println(d2.compareTo(d1));
    System.out.println(".....");
    System.out.println(d1.compareTo(d));
    System.out.println(d1.compareTo(d2));
    if(d1.compareTo(d)<=0 && d2.compareTo(d1)<=0)
    System.out.println("Success");
    }

  • New Data is not available in reporting after revrse posting

    Hello All
    I have a cube and data loaded into it.Now i came to know that one request is having wrong data and need to be deleted,without deleting I did reverse posting.Now that particular data(means new data) is not available in reporting.The reporting symbol in request(manage tab) is not available for this request.
    Now what should I do,in order to get new data in reporting.
    regards
    blaji

    sorry i solved it

  • DSO New data table rejects data

    Dear SDNers,
    I have a critical issue.
    I am loading data into a DSO (which has end routine, lookup DSO of 2crore records in production)
    In development, it worked good.
    In Production it took very long time to load data. I initially thought it might be because of the lookup DSO. But it never loaded the data into new data table. The data load monitor results in yellow always.
    I used filter in DTP and loaded only limited data. But this also not loading data. The data load monitor results in yellow again.
    Then I found that i am unable to access the new data table's data browser (from manage).
    I checked with se11 also, I am able to see the table. But if I click contents, the system hangs.
    So what I observe is New data table is not allowing to post any new entries?
    Kindly give me some insight regarding solving this issue.
    Thanks,
    Guru

    Hi Prasanth,
    I didnt say as i am able to see data in change log. I said I am able to access the data browser of both Active and change log table.
    and @Saveen, I donot want to load data manually to new data table.
    To be Precise i ll answer pransanth questions here..
    What is the status of the load in the monitor screen. Yellow (still running)
    Is the load completed or not? what is the record count? No the load is not completing.
    Is the request active in the DSo and available for reporting? Request is active
    Are you facing this issue for the first time? Yes for the first time and only in this DSO.
    Are you sure you have authorizations to check the data through manage screen, try to run the Authorization trace on your id and check if the roles are there for your id or not?  Yes, I am able to see active data table, change log etcc. even new table of other DSOs. Only new table of this DSO is inaccessible from manage
    See, I used filter in DTP, so it ll bring only limited records from lookup DSO. So no issue with the performance deadlock.
    And again I simulated the load and saw, Result package gets filled up perfectly, So the code also works fine.
    but if I load the data itll be yellow status with no records added in new table.
    In this scenario, New table is inaccesible from manage, So I am pretty sure that both are interrelated issues.
    Can some one help me pls..
    Thanks,
    Guru

Maybe you are looking for

  • Hi, Is there a way to export the output of a transaction to Memeory .

    Dear All , Here is the question SUBMIT           ws_monitor_outb_del_free                        WITH  it_vkorg = r_vkorg                        WITH  it_vtweg IN svtweg                        WITH  it_spart IN sspart                        WITH  it_

  • Free space in external drive when trash is empty

    I had a big folder in my external hard disk (60 Gb) I sent it to the trash and then I empty the trash but the space the file occupied is still ocuppied in the drive. How do I free up the space in my external drive? I know it should be free but someho

  • Hard mathematics/as3 question.

    Hi all; I've made a 3D spherical gallery that builts itself solely by the number of pictures it has to contain, and spreads the photos even on the 3D surface. basicaly the final goal is to import an XML and convert it to array that will fill the sphe

  • Photopshop CC is up-to-data but not to find

    Hi there I just upgraded my Creative Cloud account from a free trial to a payed membership. Resently I deleted Photoshop CC by dragging it to the trash and then emptying it. In my Creative Cloud it says that Photoshop CC is up-to-date, but it is nowh

  • Capture DDL for Oracle Scheduled Jobs and job from DBMA_JOBS

    I have trying at this for while and now I am stuck...so I need some help or advice. I am doing a DB migration and I need to capture the DDL for all Oracle Scheduled Jobs as well as DBMS_JOBS. Anyone have a good way? I took a datapump export last week