|
MY QUERY IS AS FOLLOWS:
ERROR MESSAGE IS AS FOLLOWS:
(comments are locked)
|
|
This is mySQL but it looks like you should change the second join to the booking table with an AND I think it should read +1 Damn you are too quick for me! :-D
Mar 11 '10 at 01:34 PM
Ian Roke
upvoting this one though there are two viable solutions. I prefer to combine the joins unless there is a good reason to separate them.
Mar 11 '10 at 03:32 PM
CirqueDeSQLeil
(comments are locked)
|
|
You have used the alias 'B' three times for the table "Booking". Use another alias:
(comments are locked)
|
|
I am not submitting a script here because Gianluca and FatherJack have already done that. I am offering a little clarification. You have
Both of these joins are using the same alias, which is not permissible in SQL. Thus changing the alias on the second, of the two joins referenced, will allow the query to complete successfully. Fatherjack implemented an alternative solution which combined both of your join statements, whilst Gianluca corrected the second alias issue and left the joins in tact.
(comments are locked)
|
|
From a SQL perspective you have this...
Wouldn't it be better just to do this?
(comments are locked)
|


This is MySQL, not SQL Server. There may be people here that know this information, but you might be better served by going to a MySQL discussion group.
This may be MySQL - however, i think the main problem resides in the alias of the inner join. That is something that can be helped with here. As for the mysql specific errors, I agree on finding a MySQL resource.
Please note that I have merged your other question with this one.