Hi Matt,
Format(Year1Qrt1MU,"0.0") & "%" AS [Qtr 1 %]
Damian.
> I have the following in a union query as one of the fields:
>
[quoted text clipped - 14 lines]
>
> Matt
On Mar 6, 8:48 pm, "doyl...@aol.com" <doyl...@aol.com> wrote:
> I have the following in a union query as one of the fields:
>
> Format(Year1Qrt1MU,"Percent") AS [Qtr 1 %]
>
> How do I get it to return only onedecimalinstead of two, as seems to
> be its want?
Which rounding algorithm?
SELECT ROUND(0.05, 1)
returns 0 (banker's rounding).
SELECT FORMAT(0.05, '0.0') ' Arithmetic rounding
retuns '0.1' (rounds away from zero) .
Jamie.
--
doyle60@aol.com - 07 Mar 2007 16:07 GMT
Onedaywhen, thanks for pointing out the two different ways to round.
Daman S., thanks but perhaps you forgot to multiply by 100. So, of
course, it is this:
Format(Year1Qrt1MU*100,"0.0") & "%" AS [Qtr 1 %]
Is there any thing bad about adding the "%" as if a text? Will I have
problems multiplying by the number in future queries, for example?
Will it still be a number?
The second question was not answered. I figured out from your above
response to make it this:
Format(Year1Qrt1EV,"#,#") AS [Qtr 1 Sales]
Is that okay? It seems to work.
Thanks,
Matt