469,110 Members | 1,957 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,110 developers. It's quick & easy.

Help With a Query!! (Please...)

Hi

I am working on porting a db from MS$QL to mysql

This query works in SQL Server, but not in mysql. It seems to be the final
line where I do a sub-query, because if I comment that out it runs fine.
Anyone know why??

Thanks...

SELECT Course.Name AS className,
Course.ID AS courseID,
Course.shortName,
Course.Description,
Course.filename,
Class.Status,
Class.ID AS classID,
Class.StartDate,
Class.EndDate,
Class.Location,
Class.StudentMax,
Class.tuition + Class.Materials AS totalCost,
Class.Materials ,
Class.tuition,
Class.Length,
CONCAT( AgeLevels.minimumAge , ' ' , AgeLevels.minUnits ,
' to ' , AgeLevels.maximumAge , ' ' , AgeLevels.maxUnits) AS AgeLevels ,
total = (SELECT COUNT(*) FROM StudentClasses)
FROM Course
INNER JOIN Class ON Class.CourseID = Course.ID
LEFT OUTER JOIN AgeLevels ON Course.AgeLevels = AgeLevels.ID
Jul 19 '05 #1
3 1013
D.Smith wrote:
This query works in SQL Server, but not in mysql. It seems to be the final
line where I do a sub-query, because if I comment that out it runs fine.
Anyone know why??


Subqueries are supported from version >= 4.1 Perhaps that is the reason?
You didn't mention what version you are using.
Jul 19 '05 #2
D.Smith wrote:
This query works in SQL Server, but not in mysql. It seems to be the final
line where I do a sub-query, because if I comment that out it runs fine.
Anyone know why??


Subqueries are supported from version >= 4.1 Perhaps that is the reason?
You didn't mention what version you are using.
Jul 19 '05 #3
D.Smith wrote:
This query works in SQL Server, but not in mysql. It seems to be the final
line where I do a sub-query, because if I comment that out it runs fine.
Anyone know why??


Subqueries are supported from version >= 4.1 Perhaps that is the reason?
You didn't mention what version you are using.
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Brad Parks | last post: by
3 posts views Thread by HB2 | last post: by
4 posts views Thread by patate069 | last post: by
7 posts views Thread by Mickyd1561 | last post: by
1 post views Thread by Andrea Belmonte - www.andreabelmonte.com | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.