Have you changed your SET ZERO ON/OFF since the last time it worked? 
SET ZERO ON and see if the problem disappears. If so, then either leave it on, as I 
do, or try one of these:
-- Only look at rows that actually have times in them
... WHERE Walk_Time IS NOT NULL 

-- If there is no time entered, time is zero
select AVG(IFNULL(Walk_Time,0,Walk_Time)) ...

"Alastair Burr" <[EMAIL PROTECTED]> wrote:

>This command has worked for well over a year:
>
>select AVG(Walk_Time) into vTotTime from Walk_Data where Route_ID NOT IN
>(14, 31)
>
>It stopped working a few days ago, on the 13th. If I add "and Walk_Date <
>13/02/2003" it's fine as it is if I use "and Walk_Date > 09/10/2001".
>
>I assume that the data is okay because, one way or the other, all of it can
>be used - and I can't see anything wrong. I have reloaded the database as
>well. The number of rows being selected is 437 with the ">" or 438 with the
>"<" than clauses.
>
>This, however, does work:
>
>compute vTotTime AS AVG(Walk_Time) from Walk_Data where Route_ID NOT IN (14,
>31)
>
>It is, therefore, not a problem as there is a work-around but does anybody
>have any idea why the select does not work? Is the any limit on the number
>of rows selected for a calculation?
>
>Thanks in advance for any help,
>Regards,
>Alastair.
>
>----------------------------------
>A D B Burr,
>St. Albans, UK.
>----------------------------------
>[EMAIL PROTECTED]
>----------------------------------
>
>


-- 
Albert Berry
Full Time Consultant to
PSD Solutions
350 West Hubbard, Suite 210
Chicago, IL 60610
312-828-9253 Ext. 32


__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! 
http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

Reply via email to