Try something like is:
select a.Name as PL_Name,b.Name as PC_Name,c.Name as PA_Name from
(select * from table1,table2 where table1.ID=table2.PL) a,
(select * from table1,table2 where table1.ID=table2.PC) b,
(select * from table1,table2 where table1.ID=table2.PA) c
where a.description=b.description
Wait, I see it now :)
-Original Message-
From: Luc Foisy
Sent: Wednesday, April 07, 2004 10:45 AM
To: [EMAIL PROTECTED]
Subject: RE: stuck with simple query. Plz have a look
I would like to ask a question here, just for my own knowledge. What is actually the
difference between
= Table1-1.PL
LEFT JOIN Table1 Table1-2 ON Table1.ID = Table1-2.PC
LEFT JOIN Table1 Table1-3 ON Table1.ID = Table1-3.PA
-Original Message-
From: Jim Page - EMF Systems Ltd [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 10:09 AM
To: gerald_clark
Cc: [EMAIL PROTECTED]
Subjec
[EMAIL PROTECTED]>
Subject: Re: stuck with simple query. Plz have a look
Forgive me, but it would be a cartesian product if there were no where
condition, I agree? It would return (size Table1)x(size Table2)^3 rows,
definitely not what Tariq wants. The query I supplied will r
Forgive me, but it would be a cartesian product if there were no where
condition, I agree? It would return (size Table1)x(size Table2)^3 rows,
definitely not what Tariq wants. The query I supplied will return (size
Table2)x(1)^3 rows won't it? Or am I missing the point?
Jim
> >SELECT ta.Name,tb.Na
Jim Page - EMF Systems Ltd wrote:
SELECT ta.Name,tb.Name,tc.Name,Description
FROM Table2,Table1 ta,Table1 tb,Table1 tc
WHERE ta.ID=PL AND tb.ID=PC AND tc.ID=PA;
Should work
Jim
(This email has been scanned for viruses by www.emf-systems.com)
I t may work, but it may consume all ram and di
SELECT ta.Name,tb.Name,tc.Name,Description
FROM Table2,Table1 ta,Table1 tb,Table1 tc
WHERE ta.ID=PL AND tb.ID=PC AND tc.ID=PA;
Should work
Jim
(This email has been scanned for viruses by www.emf-systems.com)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To uns
Looks like I trod on original post - forgot to add RE: to subject. Sorry
about that!
Jim
(This email has been scanned for viruses by www.emf-systems.com)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SELECT ta.Name,tb.Name,tc.Name,Description
FROM Table2,Table1 ta,Table1 tb,Table1 tc
WHERE ta.ID=PL AND tb.ID=PC AND tc.ID=PA;
Jim
(This email has been scanned for viruses by www.emf-systems.com)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
We have two tables
Table1:
-
ID |Name
1 |name1
2 |name2
3 |name3
4 |name4
Table2:
---
PL | PC
10 matches
Mail list logo