Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Reverse Of Number without Using reverse()

    Here is my method.

    I created a UDF.

    CREATE FUNCTION dbo.ReverseNumber ( @iNumber int )

    RETURNS INT

    AS

    BEGIN

    DECLARE @len int

    DECLARE @rev int

    DECLARE @tens int

    IF @iNumber < 10

    SET @rev = @iNumber

    ELSE

    BEGIN

    SET @len=LEN(convert(varchar,@iNumber))-1

    SET @tens = 1

    SET...

Viewing post 1 (of 1 total)