I've tried this for hours and different forums but cant get my head around to figure out this. I've tried joins and all sorts but i constantly got wrong results.
My sample table looks like below
Item Branch Type
A Main Box
A London Single
A Paris Single
A Tokyo Box
B Main Single
B London Single
B Paris Single
C Main Single
C London Box
C Paris Single
C Tokyo Single
D Main Box
D London Single
D Paris Box
D Tokyo Box
D Sydney Single
what I want to get as my result set is all Items that has a Different 'Type' to its Main 'Branch'
For example if Main Type is Box, display Main branch and other branches that has different Types
result table should look like below.
Item Branch Type
**A Main Box**
A London Single
A Paris Single
**C Main Single**
C London Box
**D Main Box**
D London Single
D Sydney Single
any help is much appreciated.
thanks