Michael Immerman <[EMAIL PROTECTED]> wrote on 11/25/2005 11:52:47 AM:

> I have a query that works perfectly in version 4.1.10a-nt however it
> fails in version 
>    4.0.24.  If someone has any ideas on how to fix the query to  run
> in 4.0.24, I would really appreciate it!  Thanks - code below:
> 
>   Select ibiBillMth,ibiBillYear,meter,ibiTotChg,id,userid,
> ibiDaysInBillingCycle,created
>   from inputbillinfo t1
>   where created = (select max(created)  from inputbillinfo t2
>   where t1.ibiBillMth = t2.ibiBillMth and meter = "3" and userid= " 5" )
>    ORDER BY ibiBillYear,ibiBillMth DESC
> 
> 
> 
> 
> Immerman and Associates LLC
> www.immermanassociates.com
> [EMAIL PROTECTED]
> 

You are using a subquery. Support for that subqueries did not appear until 
v4.1. You will need to refactor your query to use JOINs and/or temporary 
tables instead.

http://dev.mysql.com/doc/refman/4.1/en/rewriting-subqueries.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to