Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Automate script for comparing two tables Expand / Collapse
Author
Message
Posted Tuesday, March 4, 2008 4:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 19, 2008 11:01 PM
Points: 2, Visits: 6
Hi,

Any idea on how to build a sql script for comparing the data between two tables in a database with similar attributes and non similar attributes?
Post #463647
Posted Tuesday, March 4, 2008 4:37 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367, Visits: 1,585
sangeethasriram18 (3/4/2008)
Hi,

Any idea on how to build a sql script for comparing the data between two tables in a database with similar attributes and non similar attributes?


Could you explain it in a bit more details? In some cases a full outer join (and maybe some extra columns that are calculated based on whether two corresponding columns that are not part of the join are the same or not).

Regards,
Andras




Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
Post #463654
Posted Tuesday, March 4, 2008 4:38 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367, Visits: 1,585
sangeethasriram18 (3/4/2008)
Hi,

Any idea on how to build a sql script for comparing the data between two tables in a database with similar attributes and non similar attributes?


Another note :) There are third party tools for data comparison in your tables in case you need to do this frequently, need a nice UI, have the data in different databases/different servers, need to do full or partial migration/merge

Regards,
Andras




Andras Belokosztolszki, MCPD, PhD
GoldenGate Software
Post #463657
Posted Tuesday, March 4, 2008 5:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, June 9, 2012 5:29 AM
Points: 5, Visits: 42

Wondered if this script might help....
http://www.sqlservercentral.com/scripts/Administration/61813/

Otherwise - recommend the redgate tools

Regards
Suze.
Post #463667
Posted Tuesday, March 4, 2008 5:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 19, 2008 11:01 PM
Points: 2, Visits: 6
Since the number of columns are high,I cannot use the joins in the script to declare each and every column at all times.

Please let me know is there any other possibilities for different data structures to compare with huge amount of columns.
I am not suggested to use third party tools. So plz provide me in the form of SQL script if possible.
Post #463680
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse