Subject | Re: [IBO] Links question |
---|---|
Author | Helen Borrie |
Post date | 2003-06-26T12:34:12Z |
At 02:03 PM 26/06/2003 +0200, you wrote:
avoid them, JoinLinks has no function whatsoever.
Another "no-no" is what's termed "mixed syntax". It's bad SQL and the
parser should bump it (as I *think* the Fb 1.5 parser does now do). It
looks like this:
select t1.pk1, t1.pk2, t1.col1, t1.col2, t2.cola, t2.colb
from atable t1
join btable t2
on t2.fk1 = t1.pk1
where t2.fk2 = t1.pk2 <-- a join criterion is pushed down into a where clause
or
select t1.pk1, t1.pk2, t1.col1, t1.col2, t2.cola, t2.colb
from atable t1
join btable t2
on t2.fk1 = t1.pk1
and t2.fk2 = t1.pk2
/* so far, so good */
and t2.cola = 'whiskas' <-- the reverse here, a where criterion in the
join spec
Helen
>I think I will just continue to write my own joins - unless there is someNo, you should avoid SQL-89 (implicit) joins like the plague. If you do
>reason why I should use JoinLinks?
avoid them, JoinLinks has no function whatsoever.
Another "no-no" is what's termed "mixed syntax". It's bad SQL and the
parser should bump it (as I *think* the Fb 1.5 parser does now do). It
looks like this:
select t1.pk1, t1.pk2, t1.col1, t1.col2, t2.cola, t2.colb
from atable t1
join btable t2
on t2.fk1 = t1.pk1
where t2.fk2 = t1.pk2 <-- a join criterion is pushed down into a where clause
or
select t1.pk1, t1.pk2, t1.col1, t1.col2, t2.cola, t2.colb
from atable t1
join btable t2
on t2.fk1 = t1.pk1
and t2.fk2 = t1.pk2
/* so far, so good */
and t2.cola = 'whiskas' <-- the reverse here, a where criterion in the
join spec
Helen