S
subs
ocity ost ozip dcity dstate dzip consignee shipdate
a b c d e f cat 1/1/2008
h f g d e f cat 1/2/2008
p k l o z t cat 1/2/2008
l st mn d e f cat1 1/2/2008
otp ltp mtp dsc sto ppp cat2 2/3/2008
olm tma ots otaa iiiip ddddds sss 2/3/2008
ls st1 mn2 d e f cat1 1/2/2008
hi
i want to write a SQL query which can extract records which have same
dcity, dstate, dzip, shipdate and consignee but have different ocity,
ostate and ozip. In the above example, the first, second , fourth and
last record need to be extracted. The final result has to be sorted
such that you could see the pattern clearly. Can you please help with
SQL query
a b c d e f cat 1/1/2008
h f g d e f cat 1/2/2008
p k l o z t cat 1/2/2008
l st mn d e f cat1 1/2/2008
otp ltp mtp dsc sto ppp cat2 2/3/2008
olm tma ots otaa iiiip ddddds sss 2/3/2008
ls st1 mn2 d e f cat1 1/2/2008
hi
i want to write a SQL query which can extract records which have same
dcity, dstate, dzip, shipdate and consignee but have different ocity,
ostate and ozip. In the above example, the first, second , fourth and
last record need to be extracted. The final result has to be sorted
such that you could see the pattern clearly. Can you please help with
SQL query