Hmm... just realized I sent it too early. The correct statement isdelete from woe_fact_barb where (woe_sid,wo_sid) in (select min(woe_sid),wo_sid from woe_fact_barb group by wo_sid having count(1)>1);
Alisher Yuldashev wrote:
Barbara, This will delete all duplicate rows with the minimal woe_siddelete from woe_fact_barb where (woe_sid,wo_sid) in (select min(woe_sid),wo_sid from woe_fact_barb group by wo_sid);This one is to delete the minimal woe_sid with wo_sid equal 177694790delete from woe_fact_barb where wo_sid=177694790 and woe_sid = (select min(woe_sid) from woe_fact_barb where wo_sid=177694790);Thanks, Alisher Yuldashev www.pythian.com