Subject | Selection/group order causes an error |
---|---|
Author | Paul R. Gardner |
Post date | 2007-10-31T16:46:03Z |
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
The first one passes, and the second one fails. I'm using FB 1.5.4 and
I know I can't use a function (like cast) in the group by clause so I'm
referencing these by ordinal value. Why would one work and not the
other?
Thanks in advance,
Paul
[Non-text portions of this message have been removed]
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
The first one passes, and the second one fails. I'm using FB 1.5.4 and
I know I can't use a function (like cast) in the group by clause so I'm
referencing these by ordinal value. Why would one work and not the
other?
Thanks in advance,
Paul
[Non-text portions of this message have been removed]