• Well here is a real world scenario

    from

    receiver_line rl

    left outer join receiver r

    on (r.id=rl.receiver_id)

    left outer join receiver_line_del rld

    on (rl.receiver_id = rld.receiver_id and rld.receiver_line_no=rl.line_no)

    left outer join purc_order_line pol

    on (rl.purc_order_id = pol.purc_order_id and rl.purc_order_line_no = pol.line_no)

    left outer join purchase_order po

    on (po.id=rl.purc_order_id)

    left outer join purc_line_del pld

    on (pol.purc_order_id = pld.purc_order_id and pld.purc_order_line_no = pol.line_no)

    left outer join vendor v

    on (po.vendor_id=v.id)

    My problem is that i get dupicate records/rows when there is a pld record/row and I do not know hwo to avoid this.

    The table relationships are receivers to purchase orders

    There a header(1)/line(many)/line delivery(many) relationship hend the r,rl,rld and po,pol,pld

    How do I avoid the duplicate records/rows when pld exist?

    Each line could have many deliveries scheduled.

    tia,