Re: stuck with simple query..... Plz have a look

2004-04-07 Thread Yayati Kasralikar
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

RE: stuck with simple query..... Plz have a look

2004-04-07 Thread Luc Foisy
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

RE: stuck with simple query..... Plz have a look

2004-04-07 Thread Luc Foisy
= 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

Re: stuck with simple query..... Plz have a look

2004-04-07 Thread Peter J Milanese
[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

Re: stuck with simple query..... Plz have a look

2004-04-07 Thread Jim Page - EMF Systems Ltd
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

Re: stuck with simple query..... Plz have a look

2004-04-07 Thread gerald_clark
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

RE: stuck with simple query..... Plz have a look

2004-04-07 Thread Jim Page - EMF Systems Ltd
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

stuck with simple query..... Plz have a look

2004-04-07 Thread Jim Page - EMF Systems Ltd
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]

stuck with simple query..... Plz have a look

2004-04-07 Thread Jim Page - EMF Systems Ltd
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:

stuck with simple query..... Plz have a look

2004-04-07 Thread Tariq Murtaza
We have two tables Table1: - ID |Name 1 |name1 2 |name2 3 |name3 4 |name4 Table2: --- PL | PC