Subject Can I do this with a procedure?
Author ibase@telectronica.com.ar
Hi!

I want to make a procedure that updates the value in a field of a
table based on a WHERE condition. Seems easy, but I couldn't
find a sample in the Interbase documentation to do this... maybe it
didn't come with IB 5.0 or I didn't see it.
I think it should be something like this:

CREATE PROCEDURE PONEAPROBADO1
AS
BEGIN
for select aprobado from cursada
where cursada.cod_cur in
(select i.cod_cur from instancia i
where (i.num_instancia=1 and i.nota is not null)
or (i.num_instancia=2 and i.nota is not null)
or (i.num_instancia=3 and i.nota is not null)
)
into :aprobado
do
begin
aprobado=1;
suspend;
END
end

TIA,
Pablo