Subject | Re: something like delphi's 'isempty' ref/eDN6052838979 |
---|---|
Author | Adam |
Post date | 2006-10-16T12:18:02Z |
--- In firebird-support@yahoogroups.com, "Dennis" <dennis@...> wrote:
logical next step is what is the first record. If you just want a
yes/no, then the following is one way.
select
case when exists (select code_a from sales where partno='2323') then
'T' else 'F' end as IsThereAtLeast1Record
from RDB$DATABASE;
or inside a stored procedure or trigger block:
if (exists (select .....)) then
begin
end
else
begin
end
Adam
>least on
> Deal all.
>
>
>
> I want to ask the base with a query and to return me if there is a
> record with specific criteria.Usually if I need this I just do a select 'first 1' because the
>
>
>
> Using
logical next step is what is the first record. If you just want a
yes/no, then the following is one way.
select
case when exists (select code_a from sales where partno='2323') then
'T' else 'F' end as IsThereAtLeast1Record
from RDB$DATABASE;
or inside a stored procedure or trigger block:
if (exists (select .....)) then
begin
end
else
begin
end
Adam