Subject Re: What is the best way to find if THREE or more records exists
Author kaczy27
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
>
Unfortunately, I don't think EXECUTE IMMEDIATE is capable of
> doing a FOR SELECT with further processing (that would have
enabled
> you to write a stored procedure that took the number of records to
> check for as well as the table name as input parameters).
thanks Set,

I stepped into another solution (the easiest I believe),
stored_proc returning more_then smallint;
begin
for
select where ...
do begin
counter = counter + 1;
if counter > 3 then begin
more_than = 1;
suspend;
exit;
end
end
more_than = 0;
suspend;
end

>
> Set

Not sure about the stored proc execution time compared to the
straight query.


CUIN Kaczy