Subject | Re: Natural Join |
---|---|
Author | Adam |
Post date | 2005-06-08T03:12Z |
--- In firebird-support@yahoogroups.com, Grant Brown <grant@s...> wrote:
select Employee.ID, Employee.Name
from Employee
Then it is changed to
select Employee.ID, Employee.Name
from Employee emp
join Workplace wp on (emp.WorkplaceID = wp.ID)
where wp.Name = 'Some Company'
----
Out of curiousity,
If there is no ambiguity, why is it a problem? Obviously if you join a
table with itself, it needs to and definately should complain, but I
personally see no other reason to reject the query if only a single
instance of that table is used.
Can someone tell me what I am missing, or is it too hard to implement
to check that a table is only involved once. By the way, I totally
agree that it is poor coding. It does not affect my queries, but it
just may be another obstacle someone will have to overcome when they
port there product to Firebird.
Adam
> Hi Sean,The original report query may look like
>
> That makes sense.
>
> Why would one do it any way ?
>
select Employee.ID, Employee.Name
from Employee
Then it is changed to
select Employee.ID, Employee.Name
from Employee emp
join Workplace wp on (emp.WorkplaceID = wp.ID)
where wp.Name = 'Some Company'
----
Out of curiousity,
If there is no ambiguity, why is it a problem? Obviously if you join a
table with itself, it needs to and definately should complain, but I
personally see no other reason to reject the query if only a single
instance of that table is used.
Can someone tell me what I am missing, or is it too hard to implement
to check that a table is only involved once. By the way, I totally
agree that it is poor coding. It does not affect my queries, but it
just may be another obstacle someone will have to overcome when they
port there product to Firebird.
Adam