MySQL Forums
Forum List  »  Newbie

Re: Cross Reference Help
Posted by: Kerry Wilson
Date: July 19, 2005 02:27PM

The HAVING keyword did not seem to work and I could not find any documentation on the site. Is it available for 4.0.24? I did try a subquery though and it didn't work either. Here it is:

SELECT dealers.dealerName, dealers.dealerId
FROM dealers
LEFT JOIN ( SELECT count( * ) AS count, dealerId
FROM dealerMappings
WHERE categoryId
IN ( 5, 8 )
GROUP BY dealerId
) AS tally
ON dealers.dealerId = tally.dealerId
WHERE tally.count =2
GROUP BY dealers.dealerId
ORDER BY dealers.dealerName

Is there anything wrong with this statement

Options: ReplyQuote


Subject
Written By
Posted
July 19, 2005 01:52PM
Re: Cross Reference Help
July 19, 2005 02:27PM


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.