Hi out there!

We are converting our old access database to MySql, about time!

we are experiencing some problems with "double nested joins", don't know
what else to call them.

the query in access looks something like this:

SELECT arrangement.Navn, arrangement.StartDato, arrangement.SlutDato,
arrangement.vises, arrangement.ArrId, enhed.Navn, arrangement.møde FROM
enhed INNER JOIN (arrangement INNER JOIN [Arr/enhed] ON arrangement.ArrId =
[Arr/enhed].ArrId) ON enhed.EnhedId = [Arr/enhed].EnhedId WHERE
(((arrangement.StartDato)>=01-01-2001 And
(arrangement.StartDato)<=02-02-2002) AND ((arrangement.vises)=Yes) AND
((arrangement.møde)=No))";

by fixing it up a litle, it should work in MySql:


SELECT arrangement.Navn, arrangement.StartDato, arrangement.SlutDato,
arrangement.vises, arrangement.ArrId, enhed.Navn, arrangement.møde FROM
enhed INNER JOIN (arrangement INNER JOIN Arr_enhed ON arrangement.ArrId =
Arr_enhed.ArrId) ON enhed.EnhedId = Arr_enhed.EnhedId WHERE
(((arrangement.StartDato)>=01-01-2001 And
(arrangement.StartDato)<=02-02-2002) AND ((arrangement.vises)=1) AND
((arrangement.møde)=0))";

The thing is, it does'nt and no errors are returned.

the question beeing:

Can we use that kind of join combination:

"table_ref INNER JOIN (table_ref INNER JOIN table_ref ON join_cond) ON
join_cond"

if no, how do we work arround it?

Mads & Martin



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to