Subject Re: [firebird-support] Selection/group order causes an error
Author Woody
----- Original Message -----
From: "Paul R. Gardner" <gardnerp@...>
>I have an odd scenario with an SQL statement. I've been able to narrow
> down the issue to a basic SQL statement that you can duplicate on any FB
> database. Run the following statements:
>
> select cast(rdb$security_class as varchar(80)), 1
> from rdb$database
> group by 1, 2
>
> select cast(rdb$security_class as varchar(80)), 1
> from rdb$database
> group by 2, 1
>

Why are you using a group by clause without an aggregate query? Try it with
an order by clause instead.

If you want to see something really scary, try this one:

select cast(coalesce(rdb$security_class, '') as varchar(80)), '1'
from rdb$database
group by 2, 1


WARNING: So far, this locks up IBOConsole (and my PC) every time I try it.

Woody (TMW)