If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Quick way to compare two tables?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-02-03, 09:21
dnix dnix is offline
Registered User
 
Join Date: Sep 2002
Posts: 51
Question 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?)
Reply With Quote
  #2 (permalink)  
Old 09-02-03, 09:34
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Quick way to compare two tables?

Quote:
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.
Reply With Quote
  #3 (permalink)  
Old 09-02-03, 09:58
dnix dnix is offline
Registered User
 
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.

Quote:
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?)
Reply With Quote
  #4 (permalink)  
Old 09-02-03, 10:27
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Quick way to compare two tables?

Quote:
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.
Reply With Quote
  #5 (permalink)  
Old 09-02-03, 11:24
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: Quick way to compare two tables?

Quote:
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On