Subject | RE: [ib-support] Re: mass deletion |
---|---|
Author | Tony Mays |
Post date | 2002-04-10T07:24:07Z |
try this:
set term ^ ;
create procedure removal (bill_id int)
as
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 ^
set term ; ^
execute as normal with the exception of passing in the parameter
ie:
execute procedure removal 10 /* if 10 is the bill_id you wish to remove */
hope this helps.
Tony
-----Original Message-----
From: Nataraj S [mailto:nataraj@...]
Sent: Tuesday, April 09, 2002 3:58 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] Re: mass deletion
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
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
set term ^ ;
create procedure removal (bill_id int)
as
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 ^
set term ; ^
execute as normal with the exception of passing in the parameter
ie:
execute procedure removal 10 /* if 10 is the bill_id you wish to remove */
hope this helps.
Tony
-----Original Message-----
From: Nataraj S [mailto:nataraj@...]
Sent: Tuesday, April 09, 2002 3:58 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] Re: mass deletion
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
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/