Re: A Simple Query Help

2012-04-22 Thread Igor Shevtsov
Hi Rafael, You can try using correlated subquery instead of outer join. This can be slow with big tables though: SELECT * FROM users WHERE accept_email = 1 and email not in (SELECT email FROM sent_emails WHERE sent_emails .email = users.email AND messageID NOT LIKE = ‘XX’) OR OUTER JOIN as

RE: A Simple Query!

2003-03-02 Thread Uttam
Hi Bruce, yep, u r right. Anyway, MySQL query optimizer will take care of it ;) regds, -Original Message- From: Bruce Feist [mailto:[EMAIL PROTECTED] Sent: Sunday, March 02, 2003 04:00 To: [EMAIL PROTECTED] Subject: Re: A Simple Query! Hello, Uttam; We can simplify this, actually

Re: A Simple Query!

2003-03-01 Thread Bruce Feist
Hello, Uttam; We can simplify this, actually... any time L.idFilm is NULL (i.e., no row in Loans is found), L.dateReturn will have to be NULL as well. So, specifying the L.idFilm IS NULL condition is redundant. It's sufficient to look only at L.dateReturn IS NULL in the WHERE clause. Yours i

RE: A Simple Query!

2003-03-01 Thread Uttam
ch 01, 2003 08:13 To: [EMAIL PROTECTED] Subject: Re: A Simple Query! Hello, Remi; Try this; I *think* it'll work (but I'm also new to MySQL): select F.idFilm, F.title from Films F left join Loans L on F.idFilm = L.idFilm and L.dateReturn IS NULL where L.idFilm IS NULL; This provides

Re: A Simple Query!

2003-02-28 Thread Sam A. Funk
Hello, This is the way I normally do queries that would be solved with sub-selects in other products: SELECT F.idFilm, F.title FROM Films F, Loans L WHERE F.idFilm = L.idFilm AND L.dateReturn IS NULL; Sam A. Funk At 02:27 + 03/01/03, Remi Mikalsen wrote: Hello, I believe, and hope, I have a

Re: A Simple Query!

2003-02-28 Thread Bruce Feist
Hello, Remi; Try this; I *think* it'll work (but I'm also new to MySQL): select F.idFilm, F.title from Films F left join Loans L on F.idFilm = L.idFilm and L.dateReturn IS NULL where L.idFilm IS NULL; This provides an interesting example of the difference between "on" and "where", by the way; it

RE: a simple query

2002-12-14 Thread Adolfo Bello
SELECT a.Name,b.Name,c.Name FROM your_table a LEFT OUTER JOIN your_table b ON a.Code=b.ParentFemale LEFT OUTER JOIN your_table c ON a.Code=c.ParentMale > -Original Message- > From: Fam. Tarniceru [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 13, 2002 3:39 PM > To: MySQL Mailing List

Re: A simple query, please help (solved)

2002-06-14 Thread Vandana
Thanks a lot, it worked with the double datatype! On Fri, 14 Jun 2002, Michael Ivanyo wrote: > I've had similar problems with this in my career and > have come to the conclusion that one should always use > double floats. The problem is typically due to round > off errors of the float

Re: A simple query, please help

2002-06-14 Thread Gelu Gogancea
"select version();" "show create table ...;" - Original Message - From: "Vandana" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 14, 2002 7:01 PM Subject: A simple query, please help > > My table is as follows: > > Value Distance >(float) (float) >