467,081 Members | 1,074 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,081 developers. It's quick & easy.

comparing data between two tables...

I would like to compare data across two tables. I have part
information in a table. I get a new set of information periodically.
I would like to compare my new info to my old info. I recognize that
doing a compare of every attribute of every part will take FOREVER. Is
there some way I can do a "diff" based on the columns that I care
about?

Thanks!

--gloria

Jul 23 '05 #1
  • viewed: 1728
Share:
2 Replies

"gloria" <gu******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I would like to compare data across two tables. I have part
information in a table. I get a new set of information periodically.
I would like to compare my new info to my old info. I recognize that
doing a compare of every attribute of every part will take FOREVER. Is
there some way I can do a "diff" based on the columns that I care
about?

Thanks!

--gloria


No idea - your desciption isn't very clear (to me), so I suggest you post
some CREATE TABLE and INSERT statements to show exactly what you want:

http://www.aspfaq.com/etiquette.asp?id=5006

But in general, you can do something like this:

select *
from dbo.MyTable1 t1 join dbo.MyTable2 t2
on t1.KeyColumn = t2.KeyColumn
where t1.col1 <> t2.col1
or t1.col2 <> t2.col2
or ... /* other columns here */

Simon
Jul 23 '05 #2
Simon,

Your general code snippet tells me what I need to do. Thanks.

--gloria

ps. Thanks for the etiquette tip. I will do this in future. :)

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

41 posts views Thread by Odd-R. | last post: by
4 posts views Thread by osmethod | last post: by
reply views Thread by laxmiuk@yahoo.com | last post: by
2 posts views Thread by Shum | last post: by
8 posts views Thread by irek.szczesniak@gmail.com | last post: by
5 posts views Thread by Franck | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.