MySQL Forums
Forum List  »  Newbie

Re: Help
Posted by: Claude Martin
Date: April 09, 2005 05:05AM

next time post a dump. so i can just copy paste it and then have all the data. no way i'm gonna copy all that data row by row!

> SELECT date.id, pump1.TVater1, `pump3`.TVater1
> FROM date
> LEFT JOIN pump1 ON pump1.owner = date.id
> LEFT JOIN pump3 ON `pump3`.owner=date.id
> WHERE date.id = ( SELECT date.id FROM date where date=(Required date is here ) )
> GROUP BY pump1.id,date.id

why do you have a subquery?!
wouldnt that be the same:

SELECT date.id, pump1.TVater1, `pump3`.TVater1
FROM date
LEFT JOIN pump1 ON pump1.owner = date.id
LEFT JOIN pump3 ON `pump3`.owner=date.id
WHERE date.date = (Required date is here)
GROUP BY pump1.id,date.id

http://animalliberation.tk http://veganismus.ch
http://maqi.de http://tierrechtskochbuch.de

Options: ReplyQuote


Subject
Written By
Posted
April 09, 2005 03:39AM
Re: Help
April 09, 2005 05:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.