Mathematical comparison between two values (Text type)

What would be the best way to conclude which of the two values ( text type ) is higher ? 

touniformstring(1500000)<touniformstring(14285714) : this is returning as false . ( O/P should be True for mathematically to be correct )

touniformstring(1245) < touniformstring(2234) : This is returning as true as expected . 

Is there any other idea to compare two text type value's to find out which is higher ? 

P.S : The value is of text type . Changing the value to a number or decimal is out of scope . 

  Discussion posts and replies are publicly visible

Parents Reply
  • Hi Stefan ,

    Use case is similar to the question raised . Not in a position to use decimal function (The field is maintained as a Text type )

    67658889*2.6 = 1.759131e+08(Number (Decimal))

    to overcome the above , the field is maintained as a text type . Now there is a case where we need to fetch values greater than X from DB . Unfortunately the field is of type text . 

    Any suggestions or any more inputs needed ? 

Children