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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a table which has about 20 c

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. How can I find out which field are different and type them with PRINT for example. 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...
 
IonelBurtan,

Two different tables in two different databases can have same id.

It holds good for Columns and constrainst as well.

So, it is best to have an additional column to store the DBID also when you insert the other data.

That will make life a lot easier.
Regards
Karthik
 
Tnx for the tip, but I already done that...
Yes this column is called BaseId in my example and is part of the key. (check my first post)

Anything else on the real problem?

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top