Michael Satterwhite wrote:
On Monday 19 January 2004 16:30, Jochem van Dieten wrote:
Michael Satterwhite said:
On Monday 19 January 2004 15:38, Jochem van Dieten wrote:

So let's make it 2 fields:


SELECT
  t1.*
FROM
  table1 t1,
  table2 t2 INNER JOIN table2 t3
   ON (t2.rdid = t3.rdid AND t2.vid = 46 AND t3.vid = 554)
WHERE
  t1.rdid = t2.rdid

Add GROUP BY/DISTINCT per your requirements.

Although you're giving Table2 two aliases (t2 and t3) there is still only two tables and *ONE* field. In the join listed above, you are asking for the records where t2.rdid = t3.rdid (*NOT* what you want to do, you have now left t1 out of the join altogether) plus ??? (I'm not sure what this would match, although it looks interesting).

Why not hold of judgement until you are sure what it would match?

It's only the second part of the join that I'm not sure of

Then why not hold of judgement until you are sure ?



Table1 (t1) isn't used at all in the join parameters.

Not all joins are specified using the join keyword.



As records from table1 are required in the result, this won't work as desired.

Would you please just create the tables and compare all the offered suggestions?


Jochem

--
I don't get it
immigrants don't work
and steal our jobs
    - Loesje


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



Reply via email to