Subject Re: [ib-support] Mass deletion
Author Nataraj S Narayanan
On Tue, 9 Apr 2002, Doug Chamberlin wrote:

Hi



>
> Yes! Your delete statement does not reference the context of the trigger.
> (That is done using the OLD.XXX or NEW.XXX pseudo records.) Therefore, your
> delete statement is interpreted just as it would be if you issued it
> independently. What you have said is, effectively:
>
> >delete drug_bill_item where bill_id=bill_id
>
> which would naturally delete all records where bill_id is not null.
>
> What you want is something like:
>
> delete drug_bill_item where drug_bill_item.bill_id=new.bill_id;

Is it new.bill_id or old.bill_id?

>
> P.S. It would help us help you if you said what type of trigger you have
> created (before insert, after update, etc.) There can be small differences
> between them.


Well ,i had given the trigger as a 'before delete'.


regards

--
Nataraj S Narayanan
Synergy Info Systems
Kochi,India-683 503
Ph:95 484 557244