Re: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
gt; > WHERE t2.field2 IS NULL > > > > > -----Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal > > > Sent: Monday, December 09, 2002 11:38 AM > > > To: MySQL List > > > Subjec

Re: help on NOT EXISTS SQL query

2002-12-09 Thread Stefan Hinz, iConnect \(Berlin\)
9 Berlin (Germany) Telefon: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: "Murad Nayal" <[EMAIL PROTECTED]> To: "MySQL List" <[EMAIL PROTECTED]> Sent: Monday, December 09, 2002 4:37 PM Subject: help on NOT EXISTS SQL query > > >

Re: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
Hello Stefan, thanks for the feedback. I think I probably misstated my problem. I just emailed a more explicit example of the sort of thing I am trying to do. for the sake of completeness I'll reproduce it here: table id customer purchase 1 c1 microwave 2 c1 car 3 c1 freez

Re: help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
FROM table1 t1 LEFT OUTER JOIN table2 t2 ON t1.field1=t2.field2 > WHERE t2.field2 IS NULL > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal > > Sent: Monday, December 09, 2002 11:38 AM > > To: M

RE: help on NOT EXISTS SQL query

2002-12-09 Thread Adolfo Bello
SELECT * FROM table1 t1 LEFT OUTER JOIN table2 t2 ON t1.field1=t2.field2 WHERE t2.field2 IS NULL > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of Murad Nayal > Sent: Monday, December 09, 2002 11:38 AM > To: MySQL List > Subject:

help on NOT EXISTS SQL query

2002-12-09 Thread Murad Nayal
Hello all, I need to run query like (in mysql < ver.4): select * from table1 as t1 where not exists (select NULL from table2 as t2 where t1.field1 = t2.field1) I know you can emulate an 'exists' subquery with a join. but I just can't think of a way to emulate a 'not exists' without a subquery.