Subject using exists in SPs and triggers
Author Lauri Zoova
Hello!

Is this kind of usage of exist 'legal'?

CREATE PROCEDURE TEST_PROC (IN_PARAM1 TIMESTAMP) RETURNS (OUT_PARAM1
SMALLINT)
AS
DECLARE VARIABLE V_MONTH SMALLINT;
begin
v_month = extract(month from :in_param1);
if (exists(select * from test_view r where r.rdb$relation_id >
:v_month)) then begin
OUT_PARAM1 = 10;
suspend;
end
end

I'm having a problem with it in another SP. I tried to reproduce it in
this SP, but this one works as expected.


--
BR,
Lauri