Question

I need to compare the two table data with in one database.match the data using some columns form table.

Stored this extra rows data into another table called "relationaldata". while I am searched ,found some solutin.

But it's not working to me http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx

can any one help how to do this. How compare two table data with in one database using redgate(Tool)?

Was it helpful?

Solution

Red Gate SQL Data Compare lets you map together two tables in the same database, provided the columns are compatible datatypes. You just put the same database in the source and target, then go to the Object Mapping tab, unmap the two tables, and map them together.

Data Compare used to use UNION ALL, but it was filling up tempdb, which is what will happen if the table has a high row count. It does all the "joins" on local hard disk now using a data cache.

OTHER TIPS

I think you can use Except clause in sql server

INSERT INTO tableC
(
   Col1
 , col2
 , col3
)

select Col1,col2,col3from tableA 
Except 
select  Col1,col2,col3 from tableB

Please refer for more information

http://blog.sqlauthority.com/2008/08/07/sql-server-except-clause-in-sql-server-is-similar-to-minus-clause-in-oracle/

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top