Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Compare column in two tables Expand / Collapse
Posted Wednesday, January 9, 2008 5:19 AM


Group: General Forum Members
Last Login: Wednesday, July 8, 2009 9:33 AM
Points: 12, Visits: 21

I would like to compare rows which are in two different tables which have the same column and data type where the data in one table1 column (A) has repeated data. When new data is added to table1 column (A) the unique rows should be selected and added to another table2 column (A) on the same database.

Both tables have the same column name but the rows in table1 column (A) are repeated while the rows in table2 column (A) are unique.

Data is always added to table1 columnA everyday. How do i selected only the unique rows in table1 column (A) and add it to table 2 (A). To give an idea there are about 50,000 rows in table1 column (A) and about 1000 rows in table 2 column(A)

Any help is much appreciated. New to SQL so please give in detail.

Post #440545
Posted Wednesday, January 9, 2008 6:37 AM



Group: Administrators
Last Login: Today @ 8:30 AM
Points: 34,372, Visits: 18,591
Please don't cross post.

Answered here:

Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #440580
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse