Re: Rounding
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 09/22/04
- Next message: Adam Machanic: "Re: UPDATE ISSUE"
- Previous message: Just D.: "Explain TSQL running"
- In reply to: MPF: "Rounding"
- Next in thread: MPF: "Re: Rounding"
- Reply: MPF: "Re: Rounding"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Sep 2004 21:51:48 -0400
Subtracting 0.0049 and then casting to DECIMAL with a scale of 2 will
effectively truncate the third digit to the right of the decimal point:
DECLARE @YourVal DECIMAL(9,2)
SET @YourVal = 1.375 - 0.0049
PRINT @YourVal
"MPF" <abcd@senditon.com> wrote in message
news:eftVxTEoEHA.132@TK2MSFTNGP14.phx.gbl...
> Thanks in advance for any help.
>
> Via flat file, we receive a value of 1.375%. The corresponding printed
> document shows an applied rate of 1.37%, dropping any rounding that
> would/should occur.
>
> All of the functions that I have tested, with regards to rounding, round
the
> value up to 1.38.
>
> Thanks,
>
> Morgan
>
>
- Next message: Adam Machanic: "Re: UPDATE ISSUE"
- Previous message: Just D.: "Explain TSQL running"
- In reply to: MPF: "Rounding"
- Next in thread: MPF: "Re: Rounding"
- Reply: MPF: "Re: Rounding"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|