473,385 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1083
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Brad Parks | last post by:
The following are a few rows in my table: StatedValue VehType Deductible Rate 10000 Truck 1000 9.16 11000 Truck 1000 9.02 12000 Truck 1000...
3
by: HB2 | last post by:
I need to remove the first first characters of a text field in a database. Thanks for any help.
4
by: patate069 | last post by:
hi! i have a problem. i dont understand... help me please http://www.animals-superstars.com/photo-109260.html tank you patate069
2
by: xpcer | last post by:
Halo everybody, can you help me, please. Can you tell me: 1. How many databases can we create in mysql (using Windows Operating Systems) 2. How many tables can we create in every database? 3....
7
by: Mickyd1561 | last post by:
Hey everyone I'm new to this groups thing and thought maybe someone can help me. My problem is that I can't view specific images on only one website. www.baseballu.net is my baseball team's...
0
by: karizmatrix22 | last post by:
I using Microsoft ASP.NET web matrix program to create asp website..i would like to link a image to the another page.for example..when the user click on the image it should take user to the next...
1
by: Andrea Belmonte - www.andreabelmonte.com | last post by:
Hi everybody, I'm developing a C# .Net (1.1 Framework) Windows Application, and I need to encrypt, using PKCS#1 v 1.5 padding, a string using an RSA 1024 bits public key, situated in a X.509 .cer...
3
by: james121285 | last post by:
I have written a program that will take the max and min of 10 set values. I have to now change my program to allow for these inputs to be entered in by another document, and print the values into...
2
by: Dalton | last post by:
This is all kind of in another language to, I mean I understand most of the words in relation to programming, but my field of work/study is IT. Anyways, on to the problem. I am working on my 5th...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.