MySQL Forums
Forum List  »  Microsoft SQL Server

Query Conversion MS to MYSQL
Posted by: Shane Menshik
Date: April 10, 2005 03:32AM

I have an sql query that worked on MS SQL 2000.. I need to know what the mysql version needs to look like..

the MS sql query is as such:

Select CARTS.CARTNUMBER, CARTS.UNITPRICE, QUANTITY = (Select SUM(numitems) from selitems where SELITEMS.CARTNUMBER = CARTS.CARTNUMBER)

basicly thats an example of what im talking about.. It works in MS SQL but in mysql the same query gives me the error: "Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Select SUM(numitems) from selitems where SELITEMS.CARTNUMBER"

Does mysql support this using a different method? I'm trying to assign the quanity alias to the value of the total number of items assigned to the paticular cart..


Thanks!

Shane

Options: ReplyQuote


Subject
Written By
Posted
Query Conversion MS to MYSQL
April 10, 2005 03:32AM


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.