Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)

  • RE: Round real Value withoot truncation

    Thanks for all the moderator,

    At last i used the following code.

    Round(Convert(Decimal(15,5),Convert(varchar(30),Convert(Decimal(15,7),@real))),2)

    but the code is limited to a scale length of 5 and precision length of 15.

  • RE: Round real Value withoot truncation

    [Strike]Thanks for all the moderator,

    At last i used the following code.

    Round(Convert(Decimal(15,5),Convert(varchar(30),Convert(Decimal(15,7),@real))),2)

    but the code is limited to a scale length of 5 and precision length of 15.[/Strike]

  • RE: Round real Value withoot truncation

    Thanks for all the moderator,

    At last i used the following code.

    Round(Convert(Decimal(15,5),Convert(varchar(30),Convert(Decimal(15,7),@real))),2)

    but the code is limited to a scale length of 5 and precision length of 15.

  • RE: Round real Value withoot truncation

    Hi. i can able to get what i am expected when i use the below code

    Declare @real Decimal(15,7)

    Set @real=19.005

    print ROUND(@real + CAST(0.5E * POWER(0.1E, 2) AS...

  • RE: Round real Value withoot truncation

    Hi Peso, Thanks for the code.

    Your logic works well when the input type is of decimal. but my input type is real.it is rounded to 19 and not 19.01, when...

  • RE: Round real Value withoot truncation

    Thanks for the Reply. I have already tried with converting the real into decimal before converting to Varchar

    Declare @real real

    Set @real=Input

    print Round(Convert(varchar(30),Convert(Decimal(15,7),@real)),2)

    If Input = 19.005, expected...

Viewing 6 posts - 1 through 6 (of 6 total)