June 23, 2009 at 4:03 pm
Hi all,
I have two almost similiar tables in sql server (Table1 has more columns and Table2 has few less columns) for each incoming record from Table1 I want to compare whether there is any change in data by comparing each column to column. Even if there is one change in one column out of 10 columns I want to insert that record into some other Table 3. I want to run a query to compare those two tables and to find out those rows that are not common. here are the columns for the two tables
Table 1
id,
name,
address1,
state,
telno,
zipcode,
test1,
test2,
test3
Table 2
id,
name,
address1,
state,
telno,
zipcode
There are just few columns in the table and there are more than 75 columns which are in common.
In one row everything could be similiar except the tel no, in some other row everything could be similiar except the zip code. how do i run a query to figure out which row is not similiar.
Your help would be appreciated.
Thanks,
Sai
June 23, 2009 at 4:15 pm
Please don't cross post. It just wastes peoples time and fragments replies.
No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic740627-338-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 23, 2009 at 4:17 pm
Hi,
I have a same similar problem and I got the content from google and I just copied the content and added my own version to it.
Thanks,
sai
June 23, 2009 at 4:19 pm
Hi Gila,
Please let me know if I need to post a new topic for my problem or not.
Thanks,
Sai
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply