How to compare two fields in two seperate databases

Hi
Can we compare two columns in two separate databases with a one script.
Cheers
Shabar

Hi,
if you mean Oracle to sqlserver then you would have to put hand in pocket and buy ODBC connectivity for this...
If it is just a one off maybe export your data and import into Oracle table and do your one off comparision.
regards,
Robert.

Similar Messages

  • How to compare the contents of two different tables

    hello. can somebody give me an idean on how to compare the contents of two different tables in mysql?
    example, i have a table named Main List and a table named New List.
    The contents of the New List should be compared to the contents of the
    Main List, to check if they are equal. I don't have any idea how to manipulate
    this data. Hoping for your help. Thanks.

    it is better to comapre it using java.. try get the resultset first and store that in collections then comapre the two collections

  • How to compare the programs in two different systems

    Hi,
    I have two systems say A & B and i have the program say 'Z_TESTPROG'.
    How to compare the program in two different systems.
    Regards,
    Venkat

    Hi,
    Check the version in Utilities -> version -> version management in both servers is one option.
    Another one is using SE39 transaction.
    Regards
    Manasa

  • How to compare the contents of two XML documents

    Hi all,
    I was trying to compare the contents of two xml documents, they are both validate for the same XML Schema. i was using the xmlunit to do this. but some how it doesn't work like what i have expected. for example:
    1.xml : <test><item>2</item><item>1</item></test>
    2.xml: <test><item>3</item><item>2</item><item>1</item></test>
    the result from XMLUnit is this two xmls are different, but it compares <item>2</item> with <item>3</item>, which i cannot find out where the real diiffs are.
    does anybody know how i can do this correct?
    best regards,
    tina

    I faced a similar problem in one of my projects and hence wrote my own comparator. Most comparators like ExamXML etc show XML as different if the nodes under a parent node occur in different seqeunce or a set of repeated nodes occur in different sequence. The comparator that I wrote gives you the flexibility to configure how to identify a node from a set of repeated nodes and is able to compare them successfully if they occur in any order. You can view the sample output at http://geocities.com/dheerendra_itbhu/TipsFromDheeru.html
    and contact me in case you need the source code.

  • How to get different field in two are more different table using open sql

    Dear all,
              This SenthilMani am very new into sap abap am having doubt in reports how get the different fields from different tables like mara,marc,mard using open sql and native sql program give me some tips to get the data .
    with regards,
    senthil

    HI ,
      1) If u want to select data from more the two table then u can use FOR ALL ENTRIES.
             EX ..Open sql
                       select matnr from mara into table t_mara.
                      select matnr werks from marc into table t_marc for all entries in t_mara where matnr = t_mara-matnr.
      2) U can join more than one table.
               ex:
                   select mara~matnr
                              marc~werks
                    from mara join marc into table t_maramarc
                     on maramatnr = marcmatnr
    3) Using  native sql  ...only u can use JOIN statement

  • How to find difference in amount between two fields in two different tables

    Hi,
    I am new to PL/SQL. I need to write a procedure to calculate the difference between two columns of two seperate tables. For example:
    I have Table a and Table b. Both with two columns Id and Amount. I need to find the difference of Amount between table a and table b value for each record in table b, store it in variable and then do further operations using that difference. Kindly help me with this.

    Something like this?
    INSERT INTO table_c (id, diff, p_or_n)
    SELECT
    a.a_id,
    a.a_value - b.b_value
    DECODE( SIGN(a.a_value - b.b_value),
      1 , 'P',
      0 , 'P',
      -1, 'N'
    FROM table_a a JOIN table_b b
    ON (a.a_id = b.b_id);
    -- Ranit

  • How to get the field type from the database dictionary in screen painter

    hi,
    I wanted to create a new input field that input field should have the data element from the structure that i have created. How to get the data field type from the database dictionary in the screen painter

    hi
    good
    there is two kinds of evernt
    PROCESS ON HELP-REQUEST
    PROCESS ON VALUE-REQUEST.
    which ll help you to give two types of help one is f1 help and another one is f4 help
    go through this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/47/e07f622b9911d2954f0000e8353423/content.htm
    thanks
    mrutyun

  • How to compare two fields from two different groups

    My RTF template is like this.
    GROUP A
    Field 1 Field 2 Field 3 (Display in table)
    GROUP B
    **Condition
    Display Fields from B
    end GROUP B
    end GROUP A
    But I need the following condition to be added at the place (** Condition)
    IF A.Field1 = B.Field1
    Display fields from B
    END IF
    end Group B
    end Group A
    Please help, if anyone has come across such a situation.
    Thanks,
    Anand

    You can use variables to store the A.field1 value and then compare it against B.Field1.
    Take a look at this post for an example: https://blogs.oracle.com/xmlpublisher/entry/formatting_concatenated_dataso
    Thanks,
    Bipuser

  • Generate delta records by comparing multiple fields from two tables?

    I have two tables with similar fields. Let's say Table 1 (T1) has fields Customer, A, B and C. Table 2 (T2) has fields Customer0002, A0002, B0002 and C0002. For each customer (each record) I want to check whether there is any difference in field A and A0002 or B and B0002 or C and C0002. If there is a difference between any of these pairs of fields then I will update that customer's record. Currently I have a piece of code
       DATA: ls_source TYPE y_source_fields,
            ls_target TYPE y_target_fields.
      LOOP AT it_source INTO ls_source.
        if not ( ls_source-A = ls_source-A0002 ).
          MOVE-CORRESPONDING ls_source TO ls_target.
          APPEND ls_target TO et_target.
        endif.
      ENDLOOP.
    This checks for the difference between one pair - A and A0002. How can I make it check 3 pairs and update when any of them have differences?

    Hello Khaled
    Why don't you add  B and B0002 - C and C0002 fields into your if declaration?
    LOOP AT it_source INTO ls_source.
        if not (
    ls_source-A = ls_source-A0002 and
    ls_source-B = ls_source-B0002 and
    ls_source-C = ls_source-C0002
          MOVE-CORRESPONDING ls_source TO ls_target.
          APPEND ls_target TO et_target.
        endif.
      ENDLOOP.
    I think you have more than 3 fields and the count of these fields are dynamic right?
    Do you about the ASSIGN COMPONENT x OF STRUCTURE y TO <field_symbol>.  usage?
    Can you explain your need in detail please.
    Edited by: Bulent Balci on Jul 27, 2010 4:18 PM

  • How to Compare pdf contents of two pdfs?

    Hi,
    Can anyone guide me how can i do content comparision of pdf at run time. I am able to compare documets using acrobat and get the results. But I have a scenario where i need to compare two documents at runtime.
    Can assembler compare two documents and Highlight the contents? or
    Is there any JavaScript API which can perform pdf content comparision?
    Please help me on this?
    Regards
    Sunil

    Currently I am having xfa pdfs and i will be able to transform to any version (static,pdf etc) to get the comparision result.

  • How to compare record count of two tables?

    Hi,
    i am in need of simple sql script where i can compare two table record count.
    i have something like below:
    (select count(*) from table1) minus (select count(*) from table2)
    now the problem is if the table1 count greater then table2 count the output is fine.
    If the table2 record count is more then i am getting zero as the output.
    how can i get the difference in two tables record count?
    Thanks a lot in advance.
    --Raman.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Doing a MINUS between the counts does not yield the diff.
    e.g. if table A has 100 records and table B has 70 records then,
    SELECT count(*) FROM A
    minus
    SELECT count(*) from B
    will give 100 and not 30.
    Try this:
    SELECT (
    CASE WHEN ((select count(*) cnt from A) - (select count(*) cnt from B)) <0
    THEN ((select count(*) cnt from A) - (select count(*) cnt from B))* -1
    ELSE ((select count(*) cnt from A) - (select count(*) cnt from B)) END) Difference
    FROM dualor this is simpler
    SELECT abs(((select count(*) cnt from A) - (select count(*) cnt from B))) difference FROM dualEdited by: Caitanya on Jan 9, 2009 7:12 AM
    Applied abs function after seeing BluShadow's post :)

  • How to compare the data of two identical tables

    My requirement is to compare two identical tables(eg., t1 and t2) and display the column, which value got changed, old value and its new value.
    For eg:
    T1:
    StudId C1 C2 C3
    1 40 50 90
    2 30 80 100
    3 20 10 11
    T2:
    StudId C1 C2 C3
    1 100 60 90
    2 30 90 100
    3 20 60 80
    output should be:
    StudId Column prevvalue changedvalue
    1 C1 40 100
    1 C2 50 60
    2 C2 80 90
    3 C2 10 60
    3 C3 11 80
    Please help me to how to achieve using oracle pl/sql. It is bit urgent

    No need of PL/SQL, you can do it in SQL as shown
    SQL> create table t1
      2  (
      3  studentId number,
      4  c1 number,
      5  c2 number,
      6  c3 number
      7  );
    Table created
    SQL> insert into t1 values (1,40,50,90);
    1 row inserted
    SQL> insert into t1 values (2,30,80,100);
    1 row inserted
    SQL> insert into t1 values (3,20,10,11);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> create table t2
      2  (
      3  studentId number,
      4  c1 number,
      5  c2 number,
      6  c3 number
      7  );
    Table created
    SQL> insert into t2 values (1,100,60,90);
    1 row inserted
    SQL> insert into t2 values (2,30,90,100);
    1 row inserted
    SQL> insert into t2 values (3,20,60,80);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select * from t1;
    STUDENTID         C1         C2         C3
             1         40         50         90
             2         30         80        100
             3         20         10         11
    SQL> select * from t2;
    STUDENTID         C1         C2         C3
             1        100         60         90
             2         30         90        100
             3         20         60         80
    SQL> select
      2  t1.studentId StudId,'c1' ColumnName,t1.c1 prevvalue,t2.c1 changedvalue
      3  from t1,t2
      4  where t1.studentId = t2.studentId and
      5  t1.c1 <> t2.c1
      6  union
      7  select
      8  t1.studentId,'c2',t1.c2,t2.c2
      9  from t1,t2
    10  where t1.studentId = t2.studentId and
    11  t1.c2 <> t2.c2
    12  union
    13  select
    14  t1.studentId,'c3',t1.c3,t2.c3
    15  from t1,t2
    16  where t1.studentId = t2.studentId and
    17  t1.c3 <> t2.c3
    18  ;
        STUDID COLUMNNAME  PREVVALUE CHANGEDVALUE
             1 c1                 40          100
             1 c2                 50           60
             2 c2                 80           90
             3 c2                 10           60
             3 c3                 11           80
    SQL>

  • How do I link fields on two different sheets? What I am trying to do is enter data on one sheet and at the same time in is entered on a second and sometimes third sheet at the same time

    PLEASE FORGIVE ME THIS IS THE FIRST TIME I AM USING THIS
    1) How do I get data entered into 2 or 3 fields on different sheets all at the same time?

    Hi David,
    Welcome to Apple Support Communities!
    In Pages, you can have several sheets in a document, and several tables on a sheet. You can link cells between tables and sheets.
    You can not link from one document to another, but who needs to?
    To link cells from Table 1 on Sheet 1 to Table 1 on sheet 2,  click on destination cell, type =, then click on the source cell. Under the Insert menu, choose Fill if you wish to duplicate a range of cells.
    This is a bit different from Microsoft Windows Excel, but you will soon get the hang of it.
    You can download the Numbers User Guide from the Help menu.
    Happy Macintoshing!
    Ian.

  • How to compare pixel values of two different grayscale images...

    I have two different grayscale images both of much different sizes. One is 46x20 pixels and the other is 2592x1944 pixels. I'm having trouble finding a way to "scan" the smaller image through the larger one so that comparisons between the pixel values can be made. Basically I'm trying to see if anything matches the smaller image in the big image semi-closely. I can access the pixel values of each image but I can't figure out an algorithm to perform the scan. Any help at all would be very much appreciated! Thanks.

    Hi
    recipe:
    1.
    Find all the values for all the pixels in the small image. Some might be similar. Put all those values that are useful into a List called comparisonList.
    2.
    For each scanline in the large image
    For each pixel in the scanline
    is this pixel the same value as a pixel in the comparisonList?
    if so do something
    is the scanline finished?
    if not next pixel
    loop to next scanline
    where scanline is a horizontal line in the big picture.
    my 2c
    hope helps

  • How to find common fields between two tables

    Hi friends,
    Is there any way to find out common fields between tables and linking the tables based on common fields.
    Thanks and Regards,
    Chitty.

    Hi Chitty,
      Try using joins it will give the fields which are only common to both the fields.
    Here s an example,
    SELECT mara~matnr
           marc~werks
    INTO   TABLE t_material
    FROM   mara AS mara INNER JOIN marc AS marc
    ON     maramatnr = marcmatnr
    WHERE  mara~mtart = p_mtart.
    Much Regards,
    Amuktha.

Maybe you are looking for

  • Calendar Template

    I am looking for a calendar template I can use in either Pages, Numbers or Keynote - surely there is one somewhere?

  • External display color negative

    Recently I found that when I drag a window from the LCD display of my 2010 MacBook Pro 15" to a Lenovo external monitor, the dragged window will look like a film negative as shown in the pictures below. This not only applies to a browser window but v

  • Effects Filter/Plug Ins

    i searched around this board but couldn't find my answer ... i am currently comtemplating FCE and am curious to know the extent of the effects ... i would like to take videos that are shot normally and in post-production make them look like they were

  • Xcode error : invalid host string:'local host'

    I am trying to run in command line tool the following code: #import <Foundation/Foundation.h> int main(int argc, const char * argv[])     @autoreleasepool {        // insert code here...     NSLog(@"Hello, World!"); return 0; and after "Build Succeed

  • Idsync resync - To populate empty directory!

    Hi folks, I have setup message Q (enterprise edition), Sun Java DS 5.2 patch 4 and ISW 1 2004Q3 as according to the docs on Solaris 10. I do have a AD in operation. I'm trying to sync my DS with AD. Before starting ISW I read I have to run the idsync