Subject Re: [Firebird-Java] Re: Query returning row when it shouldn't...
Author Helen Borrie
At 07:54 AM 31/05/2004 +0000, you wrote:

>two things/thinks about it;
>with "select max(colname) from table" you query the result of an aggregate =
>
>function. so
>you get exact one! row and that you should expect!
>But, Stefan does firebird accept "select max(colname) AS rsname from table"=
>
> (with AS
>keyword)?

Yes it does - but it still returns a singleton result, containing NULL in
rsname.

This guy is really hard to convince that, if you ask a question in SQL that
returns a result, you'll get a result. Here and in support, he insists that
there should be NO result if the answer is null.

He ought to use whatever it takes to get

select (what you want) from atable
where exists (select 1 from atable)

That does both tasks in a single query, in the proper manner for SQL,
without wasting a second hit on the database.

H.