Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2002
    Posts
    51

    Question Unanswered: Quick way to compare two tables?

    Hello all. I have two tables that should always be exactly alike, but do get out of synch from time to time. Is there anything native to Informix that will allow you to compare to tables quickly and determine if they are out of synch?

    I dont necessarily need to know exactly what is out of synch, just that they are not alike. However, if there is a quick way to know both that would be nice.
    -thanks in advance
    When in doubt just ask your self,
    -WWSBD?-
    (what would Sponge Bob do?)

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: Quick way to compare two tables?

    Originally posted by dnix
    Hello all. I have two tables that should always be exactly alike, but do get out of synch from time to time. Is there anything native to Informix that will allow you to compare to tables quickly and determine if they are out of synch?

    I dont necessarily need to know exactly what is out of synch, just that they are not alike. However, if there is a quick way to know both that would be nice.
    -thanks in advance
    Hi Dnix,

    It depends that it wants to check.
    I think that you can use the table sysptnhdr of the base to sysmaster and columns check nptotal, npused.....
    or
    If you want to check a change in the structure with verifying the field created in the systables this resolute one.

    Gustavo.

  3. #3
    Join Date
    Sep 2002
    Posts
    51

    Re: Quick way to compare two tables?

    I just realized that I could have phrased that better. I am interested in whether or not the data in the two tables is the same, not the table structure.

    Originally posted by dnix
    Hello all. I have two tables that should always be exactly alike, but do get out of synch from time to time. Is there anything native to Informix that will allow you to compare to tables quickly and determine if they are out of synch?

    I dont necessarily need to know exactly what is out of synch, just that they are not alike. However, if there is a quick way to know both that would be nice.
    -thanks in advance
    When in doubt just ask your self,
    -WWSBD?-
    (what would Sponge Bob do?)

  4. #4
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: Quick way to compare two tables?

    Originally posted by dnix
    I just realized that I could have phrased that better. I am interested in whether or not the data in the two tables is the same, not the table structure.
    Hi,

    I do not know a utilitarian one that does this what.
    I think is that if the tables are not very great, you make unload of each one and you compare with the commando diff of UNIX.

    Gustavo.

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: Quick way to compare two tables?

    Originally posted by gurey
    Hi,

    I do not know a utilitarian one that does this what.
    I think is that if the tables are not very great, you make unload of each one and you compare with the commando diff of UNIX.

    Gustavo.
    Hi Dnix,

    Another form that I create serves to you, is the following one:
    select skstamp from sysmaster:sysptntab where partnum in (select partnum from database:systables where tabname = ' tabname').

    good luck !

    Gustavo.

Posting Permissions

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