9 messages in com.mysql.lists.win32RE: Why doesn't this query work?
FromSent OnAttachments
Pugazhendhi B- CTD, Chennai.27 Sep 2004 04:47 
A Johan27 Sep 2004 07:11 
Danny Willis27 Sep 2004 09:19 
SGr...@unimin.com27 Sep 2004 09:49 
Frederico Luis Cabral27 Sep 2004 09:54 
Danny Willis27 Sep 2004 10:02 
SGr...@unimin.com27 Sep 2004 10:02 
Danny Willis27 Sep 2004 11:33 
Patino, Hernando27 Sep 2004 11:36 
Subject:RE: Why doesn't this query work?
From:SGr...@unimin.com (SGr@unimin.com)
Date:09/27/2004 10:02:40 AM
List:com.mysql.lists.win32

Here's an example to help you get started:

SELECT sched.schID FROM s_schedules sched INNER JOIN s_races race ON sched.schID = race.racSchID ORDER BY sched.schDateRun ASC

Shawn Green Database Administrator Unimin Corporation - Spruce Pine

"Danny Willis" <dann@project-wildfire.com> wrote on 09/27/2004 01:02:49 PM:

I'm using version 4.0.2 which doesn't meet the requirement. The site I'm using is currently live, so I can't pull the site down for a db upgrade to a newer version.

I've gotten a couple of links to places where I can work towards converting the queries to an older version of mysql. Not ideal, but it seems to be necessary in my case. I'll work through them (I'm not super familiar with SQL so using all the joins is going to be a small struggle for me).

Thanks for the prompt replies everyone! I'll keep you posted.

-----Original Message----- From: Frederico Luis Cabral [mailto:frl@compuland.com.br] Sent: Monday, September 27, 2004 12:55 PM To: Danny Willis; win@lists.mysql.com Subject: Re: Why doesn't this query work?

Hi

In which MySQL version are you working ? You have a subquery in your query, and it's implemented only for the 4.1.x versions and newers.

Cheers, Fred.

SELECT schID FROM s_schedules WHERE schID = ANY( SELECT racSchID FROM s_races ) ORDER BY schDateRun ASC

I always get this error: #1064 - 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 racSchID FROM s_races ) ORDER BY schDateRun ASC

Any ideas? I'm following the manual to the T but it still doesn't work?

Thanks.