Subject Problem in stored procedure for multiple deletes/multiple times use of i/p vari.
Author Sudarshan Wad
hi,
I am writting stored procedure which will fire many delete queries
on the basis of the number as a input parameter.When in the stored
procedure i use only one delete statement and use :calapp_id in
it .it gets created and committed.but if i use more than one delete
statement which use same variable in where clause,then create
procedure query gets executed bt commit gives an error.I have given
the code ->

eg:-

SET TERM ##;
CREATE PROCEDURE Z(
CALAPP_ID INTEGER
)
AS
BEGIN
delete from calappparams A where A.caid = :calapp_id;
delete from hostedapps where caid = :calapp_id;
END ##;
SET TERM ##

//this gets compled but when i say commit;
error is -
Statement #1:
invalid request BLR at offset 90
bad parameter number

I am not getting this message.I tried by using a local
vaiable ,asigning calapp_id to it and using.But fails.I have to do
many complex deletes through the procedure.

If any one have the solution please let me know.

sudarshan