Subject | FB2 Ambiguity Rules |
---|---|
Author | James N Hitz |
Post date | 2007-05-16T10:50:03Z |
Hello Everyone
I was testing out Ramil's XLSQLRep component which had a demo with SQL
for the EMPLOYEE db specified thus:
select
FULL_NAME, PHONE_EXT, HIRE_DATE, SALARY, JOB_TITLE
from
EMPLOYEE_PROJECT EP
JOIN EMPLOYEE E ON E.EMP_NO=EP.EMP_NO
JOIN JOB J ON J.JOB_CODE=E.JOB_CODE
and J.JOB_GRADE=E.JOB_GRADE
and J.JOB_COUNTRY=E.JOB_COUNTRY
order by FULL_NAME
.. and it worked... in Firebird 2.01! I was taken aback because
according to my understanding this "violates" the strict ambiguity rules
imposed in FB2 because some fields are fully qualified (alias.field) and
others are not... or maybe the rule applies selectively on either side
of a JOIN?
I was testing out Ramil's XLSQLRep component which had a demo with SQL
for the EMPLOYEE db specified thus:
select
FULL_NAME, PHONE_EXT, HIRE_DATE, SALARY, JOB_TITLE
from
EMPLOYEE_PROJECT EP
JOIN EMPLOYEE E ON E.EMP_NO=EP.EMP_NO
JOIN JOB J ON J.JOB_CODE=E.JOB_CODE
and J.JOB_GRADE=E.JOB_GRADE
and J.JOB_COUNTRY=E.JOB_COUNTRY
order by FULL_NAME
.. and it worked... in Firebird 2.01! I was taken aback because
according to my understanding this "violates" the strict ambiguity rules
imposed in FB2 because some fields are fully qualified (alias.field) and
others are not... or maybe the rule applies selectively on either side
of a JOIN?