Does MySQL know the SELECT TOP statement?
Posted by:
Greg Covey
Date: December 01, 2004 07:02PM
I'm migrating from access and I've encountered a problem. Here's my SQL:
SELECT TOP 7 items.id, items.title, items.price, items.pricetype, items.shipping, cats.title, subcats.id, subcats.title, items.created, items.listtype FROM subcats RIGHT JOIN (cats RIGHT JOIN items ON cats.id = items.category) ON subcats.id = items.subcat ORDER BY items.created DESC;
and the error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.1.7-nt]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 '7 items.id, items.title, items.price, items.pricetype, items.shipping, cats.titl' at line 1
I can't find anything about the TOP keyword in the documentation. Does MySQL support it? My application is in ASP using ADO on a Windows 2000 server running IIS5. Any help would me much appreciated.
Thanks!