On Sun, 16 Feb 2003 16:19:14 -0500, Steve Breen wrote: >set VAR vAvgmchdt = sel average(timein-drivtime) from master where + > billstat ne 'nc' and breakdat between .vday1 and .vday2 > set var = (brnd(.vAvgmchdt, 5, .1))
Steve, you have some syntax errors here. You're sort of combining the old 2.11 way to do it with the SQL way to do it. Then, your second SET VAR command has no variable named in it! I suggest: SET VAR vavgmchdt DOUBLE SELECT AVG (timein - drivtime) INTO vavgmchdt + FROM master + WHERE billstat <> 'NC' + AND breakdat BETWEEN .vday1 AND .vday2 Bill

