Subject Re: What is the BEST method to find if a record exists?
That is probably the most efficient way BUT (there is always one) the
field needs to be declared as NOT NULL for that test to be valid.

> should have been
> 3.
> NO_RECORD_EXISTS = 'FALSE';
> testfield = null;
> select first 1 testfield from testfile
> where testfield='xxxxx' into :testfield;
> if (testfield = null) then NO_RECORD_EXISTS = 'TRUE';
>
> Thanks
>


Another way that should work is:

NO_RECORD_EXISTS = TRUE;
for select first 1 testfield
from testfile
where testfield='xxxxx'
into :testfield
do
begin
NO_RECORD_EXISTS = FALSE;
end