List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:June 28 2002 4:31pm
Subject:Re: Problem with multiple joins and/or aliasing
View as plain text  
Well, since you did not bother to tell us what hardware you are running on,
what operating system you are using, and what version of MySQL is having 
the
problem, folks probably went on to help someone who did.

Life is short,  most of us are at work, and our bosses expect to get 
some of our time.

Dave Mark wrote:

>Sigh.  
>
>I was hoping for at least SOMEONE to take a look at this.  I know it's a
>mess, but it is SUPPOSED to work... Which leads me to believe that it is
>an error/ommision with MySQL.
>
>Are there any brave souls about to tackle it?
>
>>-----Original Message-----
>>From: Dave Mark [mailto:dave@stripped] 
>>Sent: Thursday, June 27, 2002 9:37 PM
>>To: mysql@stripped
>>Subject: Problem with multiple joins and/or aliasing
>>
>>
>>The following is a neutered version of the query I am trying to run:
>>
>>SELECT TableA.Field1, TableA.Field2, TableA.Field3, 
>>TableB.Field4, TableA.Field5, TableC.Field6, TableA_1.Field3, 
>>TableB_1.Field4 FROM (TableB INNER JOIN ((TableA INNER JOIN 
>>TableA AS TableA_1 ON (TableA.Field1 = TableA_1.Field1) 
>>AND (TableA.Field2 = TableA_1.Field2) AND (TableA.GAM_ID =
>>TableA_1.GAM_ID)) LEFT JOIN TableC ON (TableA.Field3 = TableC.Field3) 
>>AND (TableA.Field2 = TableC.Field2) AND (TableA.Field1 = 
>>TableC.Field1)) ON (TableB.Field1 = TableA.Field1) AND 
>>(TableB.Field3 = TableA.Field3)) 
>>INNER JOIN TableB AS TableB_1 ON (TableA_1.Field1 = 
>>TableB_1.Field1) AND (TableA_1.Field3 = TableB_1.Field3) 
>>WHERE (((TableA.Field1)=2001) AND ((TableA.Field2)<=17) AND
>>((TableA.Field3)=6) AND ((TableA_1.Field7)<>[TableA]![Field7]))
>>
>>MySQL is showing the error to be right about at the part with 
>>the aliased table pointing back to itself... "((TableA INNER 
>>JOIN TableA AS TableA_1 ON (TableA.Field1 = TableA_1.Field1)"
>>
>>At first - because of where it was bailing, I thought it had 
>>to do with the aliasing.  However, upon stripping the query 
>>down to the bare minimum, I found that it worked.  The 
>>problem seems to occur when I add in the other tables again.  
>>Incidentally, the query works just fine in the Access version 
>>of this database.  Any ideas?  
>>
>>Thanks,
>>
>>Dave Mark
>>President & Lead Designer
>>Intrinsic Algorithm
>>www.IntrinsicAlgorithm.com
>>
>
>
>
>---------------------------------------------------------------------
>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 <mysql-thread113321@stripped>
>To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
Problem with multiple joins and/or aliasingDave Mark28 Jun
  • RE: Problem with multiple joins and/or aliasingDave Mark28 Jun
    • Re: Problem with multiple joins and/or aliasingGerald Clark28 Jun
      • RE: Problem with multiple joins and/or aliasingDave Mark28 Jun