Re: [OJB-developers] MSAccess problem with multiple non nested joins
Brought to you by:
thma
From: Oleg N. <on...@uk...> - 2002-05-17 20:28:01
|
Jakob, I've added more parenthesis in the way that you proposed, try now please. Thanks, =9AOleg On Friday 17 May 2002 10:42, Jakob Braeuchi wrote: > hi oleg, > > msaccess has a problem with multiple non nested joins without parenthes= es: > > this query has two NOT NESTED joins, one to tabKonto the other to > tabTelefon: > > SELECT DISTINCT > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entr= yDat >e ,A0.idPartner,A2.tel_nr FROM tabPerson A0 INNER JOIN tabTelefon A2 ON > A0.id=3DA2.idPerson INNER JOIN tabKonto A1 ON A0.id=3DA1.idPerson WHERE > (A1.saldo>?) AND A2.tel_nr LIKE ? ORDER BY 10 > > msaccess can not handle this (Syntax error) , because it needs parenthe= ses > around the first join: > [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler (fehlender Opera= tor) > in Abfrageausdruck 'A0.id=3DA2.idPerson INNER JOIN tabKonto A1 ON > A0.id=3DA1.idPerson'. > > SELECT DISTINCT > A0.id,A0.vorname,A0.name,A0.adresse,A0.gebDat,A0.test,A0.isBoss,A0.entr= yDat >e ,A0.idPartner,A2.tel_nr FROM (tabPerson A0 INNER JOIN tabTelefon A2 ON > A0.id=3DA2.idPerson) INNER JOIN tabKonto A1 ON A0.id=3DA1.idPerson WHER= E > (A1.saldo>?) AND A2.tel_nr LIKE ? ORDER BY 10 > > NESTED joins are handled correctly by msaccess! this query has a join f= rom > tabKonto to tabPerson and then to tabTelefon: > > SELECT DISTINCT A0.id,A0.idPerson,A0.nummer,A0.saldo FROM tabKonto A0 I= NNER > JOIN (tabPerson A1 INNER JOIN tabTelefon A2 ON A1.id=3DA2.idPerson) ON > A0.idPerson=3DA1.id WHERE A2.tel_nr LIKE ? > > greetings jakob > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We sup= ply > the hardware. You get the recognition. Email Us: bandwidth@sourceforge.= net > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |