Help in data synchonization

Hi All,
I have a two databases with same table structure. DB - A and DB - B. Table is WEB_DESPATCHES
DB - B is where transaction takes place and i move that data to DB - A every day through a procedure from DB - B.
The query I user is
select <columns> from WEB_DESPATCHES@DB - B
minus
select <columns> from WEB_DESPATCHES@DB - A
so that differential data gets inserted into DB - A.
Now my question is suppose some columns gets updated in DB - B for previous data so that how should i track and update only those columns data in DB - A
as for these records i have already taken data but data in DB - A and DB - B mismatches?
Say column SHPD_QTY,PKMS_CARTON_NBR,UNITS-PKD gets updated later in future ( say 10 days later)
How should I do in such case, Please suggest?
Table struct.
SQL> desc web_despatches
Name            Type         Nullable Default Comments
PKT_CTRL_NBR    VARCHAR2(20) Y                        
ORDER_NUMBER    VARCHAR2(30) Y                        
ORDER_REFERENCE VARCHAR2(30) Y                        
ORDER_LINE      VARCHAR2(4)  Y                        
ITEM_CODE       VARCHAR2(15) Y                        
SHPD_QTY        NUMBER(7)    Y                        
PKT_QTY         NUMBER(7)    Y                        
CONSIGNMENT_NO  VARCHAR2(20) Y                        
COPOS_LINE_NO   VARCHAR2(10) Y                        
COPOS_ID        VARCHAR2(10) Y                        
QTY_ORDERED     NUMBER(7)    Y                        
SKU_ORDERED     VARCHAR2(10) Y                        
DATE_CREATED    DATE         Y                        
STATUS          NUMBER       Y                        
PKMS_CARTON_NBR VARCHAR2(20) Y                        
UNITS_PAKD      NUMBER       Y                        

Sid_ Z. wrote:
My question is
Currently I am using this query
insert into web_despatches
select * from web_despatches@nrstp
minus
select * from web_despatches;
So after populating data into web_despatches, if suppose data is updated(few columns) in web_despatches@nrstp
then how should i keep track of this data as above statement doesn't return any rows except new ones.That is your solution to the problem and not the problem itself. Why is the web dispatches table split across 2 databases? What are the sizes? Are one the master and the other the duplicate? Are they peers? Why does rows from one table need to be pulled into the other?
There are numerous way to address problems in Oracle. Materialised views are one option that comes to mind that can address such a problem. Change Data Capture is another. Message Queues. Etc.
Your solution... I dislike. The reason is that this requires a lot of network traffic between the two servers to perform that SQL. This does not scale. The bigger the 2 tables. The more traffic. The slower the response.
Networks by nature tends to get slower and slower. Not faster. Same network infrastructure, but growing number of servers and client, growing amount of web traffic, e-mail traffic, database traffic and so on. So even if your data volumes stay constant, your SQL performance will still decrease over time as the network is impacted by other applications and systems.
So if data is to be distributed, it has to be done with a cunning plan.. (and perhaps with a giant turnip or two... {noformat};-){noformat} ). Unfortunately your SQL is not cunning, not even by the standards of good o'l Baldrick.

Similar Messages

  • Is there a Java utility class to help with data management in a desktop UI?

    Is there a Java utility class to help with data management in a desktop UI?
    I am writing a UI to configure a network device that will be connected to the serial port of the computer while it is being configured. There is no web server or database for my application. The UI has a large number of fields (50+) spread across 16 tabs. I will write the UI in Java FX. It should run inside the browser when launched, and issue commands to the network device through the serial port. A UI has several input fields spread across tabs and one single Submit button. If a field is edited, and the submit button clicked, it issues a command and sends the new datum to the device, retrieves current value and any errors. so if input field has bad data, it is indicated for example, the field has a red border.
    Is there a standard design pattern or Java utility class to accomplish the frequently encountered, 'generic' parts of this scenario? lazy loading, submitting only what fields changed, displaying what fields have errors etc. (I dont want to reinvent the wheel if it is already there). Otherwise I can write such a class and share it back here if it is useful.
    someone recommended JGoodies Bindings for Swing - will this work well and in FX?

    Many thanks for the reply.
    In the servlet create an Arraylist and in th efor
    loop put the insances of the csqabean in this
    ArrayList. Exit the for loop and then add the
    ArrayList as an attribute to the session.I am making the use of Vector and did the same thing as u mentioned.I am using scriplets...
    >
    In the jsp retrieve the array list from the session
    and in a for loop step through the ArrayList
    retrieving each CourseSectionQABean and displaying.
    You can do this in a scriptlet but should also check
    out the jstl tags.I am able to remove this problem.Thanks again for the suggestion.
    AS

  • Search help for date field in Editable ALV

    Hello Friends,
    I am using editable alv using 'reuse_* '.
    I have used date as input field. While creating fieldcatlog also i have  declared dat as a mkpf-budat.
    But i am not getting serach help for date in output.
    Is it possible with reuse or i have to go by object oriented ?

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

  • Help for date field not working after upgrade

    hi experts,
    In our BSP application for a page we had an inputfield (date).
    Onvaluehelp for input field we were calling the saphelpdate function.
    however after upgrade this functionality is not working properly as no pop up comes after clicking on the icon.
    we have upgraded to SPS 16 recently.
    please help me.
    regards,
    Arvind.

    Hi, I try upper case but nothing happen. This is all my code by far, I hope you can help me:
    DATA: BEGIN OF T_PCONT OCCURS 0,
          PCONT LIKE ZPSPERMISOS-PSOBKEY,
    END OF T_PCONT.
    DATA: BEGIN OF T_FIELDS OCCURS 0.
            INCLUDE STRUCTURE help_value.
    DATA END OF T_FIELDS.
    DATA: BEGIN OF T_VALUES OCCURS 0,
          VALUE(60) TYPE c.
    DATA: END OF T_VALUES.
    DATA: N TYPE i.
    SELECTION-SCREEN BEGIN OF BLOCK  b20 WITH FRAME TITLE text-b02.
      SELECT-OPTIONS:
        P_CONT FOR  ZPSPERMISOSH-PSOBKEY OBLIGATORY NO-EXTENSION NO INTERVALS,
        P_INT  FOR  ZPSPERMISOSH-PARTNER OBLIGATORY NO-EXTENSION NO INTERVALS,
        P_FEC  FOR  ZPSPERMISOSH-ZFINICN NO-EXTENSION NO INTERVALS,    
        P_RAZ  FOR  ZPSPERMISOSH-ZRAZONFINIC NO-EXTENSION NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK b20.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CONT-LOW.
      PERFORM P_HELP_P_CONT USING P_CONT-LOW.
    *&      Form  P_HELP_P_CONT
    FORM P_HELP_P_CONT  USING P_P_CONT.
      DESCRIBE TABLE T_PCONT LINES N.
      IF N EQ 0.
        T_FIELDS-FIELDNAME  = 'PSOBKEY'.
        T_FIELDS-TABNAME    = 'ZPSPERMISOS'.
        T_FIELDS-SELECTFLAG = 'X'.
        APPEND T_FIELDS.
        CLEAR T_FIELDS.
        SELECT PSOBKEY FROM ZPSPERMISOS
        INTO  TABLE T_PCONT.
        SORT T_PCONT BY PCONT.
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
        EXPORTING
          CUCOL        = 10
          CUROW        = 1
          TABNAME      = 'T_PCONT'
          FIELDNAME    = 'PCONT'
        IMPORTING
          SELECT_VALUE = P_P_CONT
        TABLES
          FIELDS       = T_FIELDS
          VALUETAB     = T_VALUES.
    ENDFORM.                    " P_HELP_P_CONT
    Edited by: J. Garibaldi on Nov 25, 2009 11:14 AM
    Edited by: J. Garibaldi on Nov 25, 2009 11:16 AM

  • F4 help for date in select options..

    Hi Gurus,
    I want a search help for date field which belongs to select options.
    I know if it is a parameter we directly map the attribute value to that data element.
    Can some help me with this..
    Best Regards,
    Navin Fernandes.

    Hi Gurus,
    The select options works for date.. I got the solution.
    It directly relates to the default data dcitionary help.
    Got it from this example: WDR_TEST_SELECT_OPTIONS
    Best Regards,
    Navin Fernandes.

  • Search help for date in VC

    Hi, 
    I have created an iview in Visual Composer for a query. it contains date field on selection variable fomr. i tried entering date in various format, but it gives an error : variable expects interval value ; enter an interval".
    can we provide search help for date field in VC?
    Regards,
    Sonali.

    Hi,
    You have to create search help it avoid inconsistency.
    Thanks & Regards,
    Venkat.

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Search help for DATE field

    HI all,
    I want to attach search help for a DATE field created in screen painter.
    For PERNR, PREM is attached. Similarly what is the statndard search help name for DATE field?
    Thanks,
    Shanthi.

    Hi ,
    Declare the date field as sy-datum ,
    parameters : date type sy-datum .
    This shud bring the standard search help for date .
    Thanks ..Get back for any issues.
    Anil

  • To implement search help for date and time fields details

    how can i implement search help for date and time fields in screen painter

    Hi
    Declare the variables as sy-datum and sy-uzeit or any other pre-defined data typ of date and ime types. Serach help will automatically comes.
    Aditya

  • Help convert date

    hi help convert date
    April 26, 1904....August 12, 1979
    to dd/mm/yyyy

    SELECT CONVERT(VARCHAR(15),CAST('April 26, 1904' AS DATE),103)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates.
    One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
    When I query the database the date must be formatted dd-MMM-yy
    I am able to get today's date by doing this:
    java.util.Date today = new java.util.Date();
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    String today_str = sdf.format(today);
    My code for printing the calendar: I left out some of the table formatting in the JSP page.
    GregorianCalendar d = new GregorianCalendar();
    int today = d.get(Calendar.DAY_OF_MONTH);
    int month = d.get(Calendar.MONTH);
    d.set(Calendar.DAY_OF_MONTH,1);
    int weekday = d.get(Calendar.DAY_OF_WEEK);
    for(int i = Calendar.SUNDAY; i < weekday; i++)
    out.print("<td> </td>");
    do {
    int day = d.get(Calendar.DAY_OF_MONTH);
    out.print("<td>" + day + "</td>");
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    if(weekday == Calendar.SATURDAY)
    out.println("</tr><tr valign=top>");
    d.add(Calendar.DAY_OF_MONTH,1);
    weekday = d.get(Calendar.DAY_OF_WEEK);
    } while(d.get(Calendar.MONTH) == month);
    if(weekday != Calendar.SUNDAY)
    System.out.println();
    The part I need help on is this:
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
    All the function in the Date class that I think would do this have been deprecated.

    Need Help with Dates
    Here is some information about dates:
    There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
    The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
    Hope that helps.

  • F4 help in data element.

    I have a fileld in table that has the structure of eban.
    There is a field pstyp and it has input help in it's data element.
    I want to suppress the f4 help and attach customized f4 help without implementing Badi.
    Please help how to suppree the data elements f4 help.

    make your own structure, use own data element. Assign own search help to data element. Or assign own search help in your own structure. Then you dont even need an own data element, just copy structure EBAN and change search help assign in structure..
    Thats when you need it generally.
    If you just need to overwrite the search help for e.G. a certain Dynpro, then just assign your own search help to the dynpro field.

  • F1 Help for Data elements

    Hi All,,
    i want to add F1 help for data elements.How can i do this.Kindly suggest me the steps to perform this.

    hi
    use this link
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/d47ee849e111d189730000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/11e39c459d7201e10000000a155369/frameset.htm
    Cheers
    Snehi
    Edited by: snehi chouhan on Jul 24, 2008 11:10 AM

  • BT Desk Top Help Up-Date Message - What's this all...

    I have been getting a dialog box appear at the bottom of my display for the past few weeks stating that there is a Desk Top Help up-date available for my Home Hub - click to download up-date. etc.
    It's genuine enough as I can access it from my BT Broadband Desktop Help section of the main BT web page.
    My point is, as I have just tried again to download it, after 8% of the download it comes up with a dialog that tells me there are 'issues with BT downloading right now' and to try again, later.
    Well, I have 'tried again later' for the past three weeks, in the morning and in the evening and everytime it has stopped at the 8% stage.
    Anyone know what this is all about? 
    Anyone know what the up-date brings to the party?
    Anyone find Desk Top Help (DTH) is actually helpfull?  I ask this because every time it pops up telling me there is a problem with either my email accounts or my hub connection, and do I want DTH to assist me in fixing it, it runs through it's procedures but ends by telling me everything is ok and there is nothing wrong! I could have told it that before it started!!
    After a few weeks of having this come up when you are right in the middle of something, then being forced to wait whilst it 'does it's thing' only to find nothing was in-fact wrong, becomes extremely annoying.
    Do we actually need it?
    Any useful tips/points/advice/experiences would be appreciated.
    Thanks,

    Hi seawings
    I had posted a fix on a problem like this on a different thread and it should work for you too
    Have a look at my post here and see it it does the trick.
    With regards to how useful Desktop Help is, we have reports from literally thousands of customers each month that this fixs problems for them.  Maybe not everyones cup of tea but from what I see it works really well.
    Thx
    Craig
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)”
    td-p/30">Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Need help in date Validation Urgent

    Hi ,
    We need help in Date Validation.
    we have 2 Date fields on the form Start Date, End Date
    The requirement is: End Date (May not be greater than 30 years from the start date).
    I have written following script on End Date Exit event. But the problem is its calculating 30 years from the Current Date not from the Start Date
    var tDate = util.scand("mm/dd/yyyy", new Date());
    var M = tDate.getMonth();
    var D = tDate.getDate();
    var Y = tDate.getFullYear();
    var SRes = util.printd("yyyy-mm-dd", new Date((Y+30), M,D) );
    //app.alert(SRes)if (SRes <= this.rawValue){
    app.alert("May not be greater than 30 years from the start date")
    xfa.host.setFocus(
    this);}
    can someone please help me
    Regards,
    Jay

    Hi,
    You'll need to get javascript date from LCD field, and calculate & compare with the future date in javascript date.
    try following script;
    var sDate = StartDate.rawValue;
    var wkStartDate = util.scand("yyyy-mm-dd", sDate);
    var nYear = wkStartDate.getFullYear();
    var nMonth = wkStartDate.getMonth();
    var nDay = wkStartDate.getDate();
    var wkFutureDate = new Date(nYear  + 30 , nMonth, nDay);
    sDate = EndDate.rawValue;
    var wkEndDate = util.scand("yyyy-mm-dd", sDate);
    if (wkEndDate.getTime() > wkFutureDate.getTime()){
      xfa.host.messageBox("May not be greater than 30 years from the start date");
      xfa.host.setFocus(this);

Maybe you are looking for