Results 1 to 2 of 2

Thread: Seeking solution for a problem

  1. #1
    Nour Guest

    Seeking solution for a problem

    Hi Guys;

    I have two tables: tbl1 and tbl2.
    They have the same structure, same columns. Except tbl1 and tbl2 may have some different values for some columns due to changes made by different users.

    I have wrote a stored procedure to extract all the ROWS where at least one column value is different in tbl2 from tbl1 and it works.

    My objective is to write in a third table the exact column and the value that has been changed.

    as example:
    tbl1 and tbl2 have 5 columns col1, col2, col3, col4, col5

    for each row based on a PK such as oid:
    for each oid we compare the 5 columns from each table and if the value in col3 in tbl1 is different from col3 in tbl2, I should be able to identify it clearly in a third table.

    Do you have any great idea (i am sure YES).

    Thanks in advance.


  2. #2
    Guest

    Seeking solution for a problem (reply)

    You can use SELECT something INTO Table3 from ...


    ------------
    Nour at 8/30/00 8:50:08 PM

    Hi Guys;

    I have two tables: tbl1 and tbl2.
    They have the same structure, same columns. Except tbl1 and tbl2 may have some different values for some columns due to changes made by different users.

    I have wrote a stored procedure to extract all the ROWS where at least one column value is different in tbl2 from tbl1 and it works.

    My objective is to write in a third table the exact column and the value that has been changed.

    as example:
    tbl1 and tbl2 have 5 columns col1, col2, col3, col4, col5

    for each row based on a PK such as oid:
    for each oid we compare the 5 columns from each table and if the value in col3 in tbl1 is different from col3 in tbl2, I should be able to identify it clearly in a third table.

    Do you have any great idea (i am sure YES).

    Thanks in advance.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •