At 03:20 PM 4/21/05, Scott Hamm wrote:
However when I used left join (trying to learn it) I issued this command:

SELECT
        QA.OperatorID,
        QA.QAID,
        QA.BrandID,
        QA.Batch,
        QA.KeyDate,
        Batch.[Order],
        Batch.Errors,
        Batch.Comments
FROM
        QA
Left Join
        Batch
ON
        (Batch.QAID=QA.ID)
WHERE
        ID='77363';

How do I get around to it with 2 different names that uses SAME table?

QA.OperatorID (operator)
QA.QAID (reviewer)

Or am I asking for the impossible?


It's not impossible, but I don't think you've provide enough info to provide an example with your data. The left join is not the problem. What you need is to join the same table twice - to do this properly you need to give each reference to that table an alias. So lets say your names are in a table called "names" with fields: id and name. Then add this to your SQL:
join names QAO on QAO.id = QA.OperatorID
join names QAR on QAR.id = QA.QAID




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to