Compare 2 SQL Tables for change in data

I have 2 SQL tables, one is the current months data (TABLE A) , and one is the previous months data (TABLE B).

When the new data is imported, the data is moved  from (A) to (B) then the new data is imported into (A). Thus giving us a rolling 2 months data.

Each table contains 3 columns, of { CODE, DESC, PRICE}

I would like to run a report that shows ONLY the data that has changed in the last month, whether is be DESC or PRICE or BOTH... code never changes....
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

something like this should work.
select t0.CODE, t0.DESC, t1.DESC, t0.PRICE, t1.PRICE
from tableA as t0
inner join tableB as t1 on t0.CODE = t1.CODE
where t0.DESC <> t1.DESC or
      t0.PRICE <> t1.PRICE

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CSLITADMINAuthor Commented:
wicked cheers...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.