Subject Re: [IBO] FieldName in query with joins and aliases 4.7 bevahes different than 4
Author Marco Menardi
--- In IBObjects@yahoogroups.com, "Jason Wharton" <supportlist@...> wrote:
>
>
> I said:
> > It's an attempt to return the simplest identifier of
> > the column necessary to uniquely describe each row.
>
> What I mean is to uniquely identify the column in the row.
>
> If you have two tables it is possible that they share a column with
the same
> name so this ensures that each column will be properly identified.
>
> Jason
>

So this ends also the "private" thread we had about my query that made
IBO prefix a ".(" (solved), ignored alias (solved) and, but you tell
me is a design decision, prefixes table name to the alias.
I will change my sourcecode according to this change, then.
But wondering if, in case of alias usage, the tablename prefix is
useless, should be developer's responsibility, in case of same name in
the 2 joined tables, to prefix tablename in the select, like (with
field2 belonging to both table1 and table2, field1 unique to table1):
select
field1,
table2.field2 as alias1
from
table1
left join table2 on ...

and IBO use this fieldnames:
field1
alias1

And also, in case of same fieldname, you could leave the
responsibility to the developer, so you can have:

select
field1,
table2.field2 as alias1,
table1.field2
from
table1
left join table2 on ...

and have IBO return
field1
alias1
table1.field2

regards
Marco Menardi