Just created and tried a trigger in drug_bill. The following is the body
of the trigger
delete drug_bill_item where drug_bill_item.bill_id=bill_id;
The result is startling!! it empties the drug_bill_item table when i
delete records in drug_bill.
Something wrong with the trigger?
> Have you tried having a before delete trigger on drug_bill that
> deletes the appropiate drug_bill_item.
> Then you can just do:
> delete from Drug_bill Where Bill_Date between '01-JAN-1999' and
> >From: Nataraj S Narayanan <nataraj@...>
> >The Tables to delete data are Drug_Bill and Drug_Bill_Item ,where the 2nd
> >table has a foriegn key of Drug_Bill by name Bill_Id.
> >As said by Helen I gave the command 'Delete from Drug_Bill_Item where
> >Bill_id in (select Bill_id from Drug_bill Where Bill_Date between
> >'01-JAN-1999' and '31-DEC-1999')
> >Unfortunately, the operation takes aeons (7 hours) to complete. The gdb is
Nataraj S Narayanan
Synergy Info Systems
Ph:95 484 557244