Subject Re: [ib-support] Name of Returned Field
Author Claudio Valderrama C.
"Nando Dessena" <nandod@...> wrote in message
news:3BFDF9D0.654AF23@......
> Robert,
>
> > Select distinct substr(ZIP,1,5)
> >
> > returns a field named substr with all the values.
> >
> > This is really stupid.
>
> All expressions generate column names on which I would never count.
> I always use an alias if I need to impose a name (and I always need).
> BTW, what should it return? Should it use "ZIP" as the column name?
> Should I call "body" what is actually a leg?

Which bug is Robert complaining about?

select substr(rdb$relation_name, 1, 3)
from rdb$relations
where rdb$relation_name starting 'R';
=> lot of RDB entries plus other names.

Now, again in my case:

SQL> select distinct substr(rdb$relation_name, 1, 3)
from rdb$relations
where rdb$relation_name starting 'R';

SUBSTR
============================================================================
===
RDB
REP
RES

SQL> select distinct substr(rdb$function_name, 1, 1) from rdb$functions;

SUBSTR
========================================================================
A
B
D
F
L
M
R
S
Z
u
z

I think the result is correct in both cases.

Robert, don't walk to the street today, this may be your bad day, Murphy is
watching you.
:-)

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing