Subject Re: Query plan again
Author Christian Kaufmann
Hi Arno,

> If you need a ORDER by index you can turn your LEFT JOIN into a
> sub-query (ofcourse only when 1 or none match is made).
I wasn't aware of this syntax, but that works fine. But only for one
record in MN and one field in MN, or is that possible too?

The following code didn't work:

select
first 25 skip 0 FIRSTNAME, LASTNAME, BIRTHDATE,
GENDER, C.CODE, SWIMTIME, PLACE1,
M.CITY as MEETCITY, M.STARTDATE as MEETDATE,
(SELECT MN.CODE, MN.NAME FROM CLUB MN WHERE
MN.CLUBID = M.NATIONID) as MEETNATION, MEETNATIONNAME
from
RANKINGITEM RI
...

> be fixed, but if you want something specific in your own order. It's
> probably the best to write a selectable stored procedure.
What do you think about the solution with a "null record" in every
table I do such LEFT JOIN's? The query and plan is perfect, but are
there any other trade offs?

cu Christian