Re: Rounding Problem
From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 07/04/04
- Next message: William: "SQL DB"
- Previous message: s.isa: "Rounding Problem"
- In reply to: s.isa: "Rounding Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 04 Jul 2004 22:02:32 +0200
On Sun, 4 Jul 2004 11:50:24 +0300, s.isa wrote:
>Hi all,
>
>Is there any function that truncates a decimal numeric without rounding, if
>i use cast it rounds the figure but can i don't want that i.e i want it to
>be as follows:
>
>23.1238 turns to 23.123 and not 23.124 so it keeps only three decimals as
>is
>
>Please advise if there is any function or so
>
>Thanks in advance
>Suad
>
Hi Suad,
DECLARE @Test decimal(9,5)
SET @Test=23.1238
SELECT CAST((@Test - 0.0005) AS decimal(9,3))
Best, Hugo
-- (Remove _NO_ and _SPAM_ to get my e-mail address)
- Next message: William: "SQL DB"
- Previous message: s.isa: "Rounding Problem"
- In reply to: s.isa: "Rounding Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|