MySQL Forums
Forum List  »  Docs

Re: i need help for Error :1064
Posted by: Shawn Green
Date: March 31, 2005 11:36AM

I think you error is related to your actual subquery. My version of perror didn't understand a 1064 but I will bet that if you change your subquery to just

(SELECT distinct(b.topic_id) FROM messageboard b)

it will help. You can also get the same information WITHOUT using a subquery:

SELECT count(topic_id)
,topic
,creator_id
,modify_date
,respondant_id
FROM messageboard
WHERE active='Y'
GROUP BY topic, creator_id, modify_date, respondant_id
ORDER BY topic_id, modify_date desc;

I can eliminate the subquery because you were asking for every topic_id and you were referencing the same table. There is no need to ask for all of the data from a table that matches a list made up of all of the data from that same table.... it's just wasting server resources.

Options: ReplyQuote


Subject
Views
Written By
Posted
3556
March 06, 2005 10:12PM
Re: i need help for Error :1064
3174
March 31, 2005 11:36AM


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.