Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing pairs of lengthy rows

Status
Not open for further replies.

IonelBurtan

Programmer
May 25, 2001
601
RO
I have a table which has about 20 columns with a key of 3 fields (BaseId, IdObject, IdConstraint) in which I have information about all the constraints of all tables of 2 databases.

The probelm is:

For the constraints that exists on both databases I have 2 records, which I know that are diferent on non-key fields. How can I find out which field are different and type them with PRINT for example, in the most efficient way. The table has around 3000 lines , so I have to consider also the efficiency.

Ex:

BaseId IdObiect IdConstraint NumeConstraint Tip IsClustered ...
----------- ----------- ------------ --------------------- ------ -----------
5 215671816 247671930 PK_CMP_Test PK 1 ....
9 1084439533 1116439647 PK_CMP_Test PK 1 ....


Thanks,



s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
IonelBurton,

It is not clear what you want to do by your question. You will have better luck if you are more explicit. Also, people find it very irritating when you post the same question twice.

“I have always found that plans are useless, but planning is indispensable.” --Dwight Eisenhower
 
The first time, i post it, was not complete. You can see that there are some differences. I do not understand what is your problem with that.

The problem is resuming to comparing 2 rows and telling what fields are different and what are the different values.
I cannot be more complete than that

Tnx for answering anyway,

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
What might help us is an example of the data in the table (more records thatn what you gave us) and then an example of the result you want reutrned.

I think we are not sure what field(s) you want to compare on and what you are looking for in terms of matching the records up.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top