Link to home
Start Free TrialLog in
Avatar of heyday2004
heyday2004

asked on

Query to find out records with non-duplicate of two columns combination

This is an extension for question:
https://www.experts-exchange.com/questions/28383519/Query-to-find-out-records-with-duplicate-of-two-columns-combination.html?anchorAnswerId=39914320#a39914320

I have two tables that have the same structure but data might be slightly different. Table names are a and b and column names to be used are c1, c2 (there are many other columns for table a or b)

Example:
select c1, c2 from a
c1 c2
2  UK
3  USA
5  Japan

select c1, c2 from b:
c1  c2
2   UK
3   USA
5   France

After the query, result should be (retrieve c1, c2 info from table a)
c1 c2
5 Japan

Again, please note: I need to compare combined fields of c1 + c2. It's assumed both table a and b have the same number of records and mostly identical
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of heyday2004
heyday2004

ASKER

Thanks, but seems not exactly working as requested. I needs to compare combo of c1 and c2, seems above query didn't list all the occurrences.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry for the late reply. Thanks for all the help.