Hello,

I am having a problem with this correlated sub query.  I get a syntax error
at the second SELECT.
This is part of a larger query with other aggregated sub queries or I would
consider a JOIN instead.
I tried running the sub query by itself and it works.  I tried LEAST for
MIN, same result.
The jobnumber/jobno fields are Chars and the schstartrun is a Double.
I am developing on Windows XP with MySQL 4.17.

Thanks for any help
Glenn




  SELECT
        pj.jobnumber,

     (SELECT MIN(pl.schstartrun)
             FROM plist pl
             WHERE pl.jobno = pj.jobnumber
            AND pl.schstartrun > 0)
            AS SchStart
         FROM
          planjobs AS pj





Glenn Holden - Pivotal Z
[EMAIL PROTECTED] / 303 400 0573 / www.pivotalz.com
17328 E Bates Place, Aurora, Colorado 80013-2206 / fax 425 984 0297


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to