delete query wth a condition

S

subs

ozip dzip consignee shipdate
c f cat 1/2/2008
g f cat 1/2/2008
l t cat 1/2/2008
l1 t cat1 2/3/2008
l1 t cat1 2/3/2008

I want to delete the first two records in this table since they donot
have any other record with SAME dzip ,consignee ,shipdate
but DIFFERENT ozip. On the other hand , the last two
records have another matching record(the third one) which have SAME
dcity,dstate,dzip ,consignee ,shipdate but DIFFERENT
ozip. So my final output should be only last three records. IS THERE
ANY SQL QUERY or Delete Query with a condition.PLS HELP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

deleting duplicates but with a condition 5
Pls help with SQL query 12
SQL 1
SQL 2
Query needed 3
Pls help. urgently required 2
Query Help 2
Query combining the tables 15

Top