Bill,

Sometimes I work with code I do not understand but can make it work.

Here is the question why did you SET VAR vavgmchdt DOUBLE

Also I can not remember why this works:  set var = (brnd(.vAvgmchdt, 5, .1))

I have learned it is never dumb to ask a question just dumb not to ask it.

Steve

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill
> Downall
> Sent: Sunday, February 16, 2003 4:30 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: Reducing the number of decimal places
>
>
> 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

Reply via email to