Subject | Re: mass deletion |
---|---|
Author | Nataraj S |
Post date | 2002-04-10T06:50:05Z |
hI
Please check this procedure for me.
CREATE PROCEDURE REMOVAL
AS
declare variable bill_id INTEGER;
begin
for select bill_id from drug_bill where bill_date between '01-JAN-2001'
and '01-FEB-2001' into :bill_id do
begin
delete from drug_bill_item where bill_id=:bill_id;
delete from drug_bill where bill_id=:bill_id;
end
end
How do I send the bill_id in drug_bill as a parameter to the procedure ? Does :bill_id automatically reference the data in the drug_bill
table?
regards
Nataraj S Narayanan
Please check this procedure for me.
CREATE PROCEDURE REMOVAL
AS
declare variable bill_id INTEGER;
begin
for select bill_id from drug_bill where bill_date between '01-JAN-2001'
and '01-FEB-2001' into :bill_id do
begin
delete from drug_bill_item where bill_id=:bill_id;
delete from drug_bill where bill_id=:bill_id;
end
end
How do I send the bill_id in drug_bill as a parameter to the procedure ? Does :bill_id automatically reference the data in the drug_bill
table?
regards
Nataraj S Narayanan