MySQL Forums
Forum List  »  Microsoft SQL Server

SQL query issue
Posted by: clifford
Date: July 05, 2004 04:04AM

Hi there,

I just recently moved all our stuff from MSSQL to MySQL and I'm glad to report everything went fairly well. I'm having just a few small issues one of them being this SQL query which I can't seem to solve. If anyone can assist I would appreciate it. The MSSQL query is:

SELECT ID, CategoryName, (SELECT COUNT(*) FROM adcontent A INNER JOIN Subcategories S ON A.TopicID=S.ID WHERE S.CategoryID=C.ID ) AS Entries FROM Categories C GROUP BY ID, CategoryName ORDER BY CategoryName

I have tried to get it to work on MySQL without joy. Basically the ouput must be ID, CategoryName and a count as Entries from Categories. Any help would be much appreciated.

Many thanks,
Clifford.

Options: ReplyQuote


Subject
Written By
Posted
SQL query issue
July 05, 2004 04:04AM
July 05, 2004 04:22PM
April 28, 2008 03:35PM
May 28, 2008 12:30AM


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.