how to get decimal value with no rounding

Database
Enthusiast

how to get decimal value with no rounding

Hi,

I have a requirement to get the decimal value with no rounding for a comparision purpose.

when i use format and cast it is defaultly rounding.

Ex:  if decimal value is 23.456, i need the output as 23.45  not as 23.46

Can any one help !!

--Sri

Tags (1)
3 REPLIES
Enthusiast

Re: how to get decimal value with no rounding

Enthusiast

Re: how to get decimal value with no rounding

1)You may cast the value as character,take the 2 digits after decimal(use position,String length functions) and again cast back to decimal(18,2)

Enthusiast

Re: how to get decimal value with no rounding

Thanks saeed.. Carlos's solution worked for me.

Thanks Kishor for suggestion .