MySQL Forums
Forum List  »  Optimizer & Parser

Question regarding 5.0 LEFT JOIN
Posted by: Timothy Brooks
Date: March 27, 2006 04:59PM

The query below works fine in earlier versions of MySQL but fails in 5.0. The reason for failing is: "Unknown column 'p.person_id' in 'on clause'" Try as I might, I cannot figure out why MySQL 5 doesn't like this query.


SELECT vq.vocab_question_id, vq.question_order, v.vocab_id, v.vocab_order, sp.part_id, sp.part_order
FROM person p, part sp, vocab v, vocab_question vq
LEFT JOIN answer_vocab sa ON (sa.vocab_question_id = vq.vocab_question_id AND sa.person_id = p.person_id)
WHERE p.person_id='5'AND sp.passage_id = '48' AND sp.part_id = v.part_id AND v.vocab_id = vq.vocab_id AND sa.student_answer IS NULL
ORDER BY sp.part_order, v.vocab_order, vq.question_order

Edited 1 time(s). Last edit at 03/27/2006 05:13PM by Timothy Brooks.

Options: ReplyQuote

Written By
Question regarding 5.0 LEFT JOIN
March 27, 2006 04:59PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.