Patent ID: 6907435

Claim:
A computer implemented method for converting a numeric database value in a binary representation, having a plurality of bits, to a text string while preserving numeric precision and sort order, the method comprising the steps of: determining the type of the numeric database value; in response to a determination that the numeric database value is an integer type, performing the steps of: inverting an integer sign bit, and converting the integer type numeric database value from the binary representation to a hexadecimal representation, in response to a determination that the numeric database value is a floating point type, performing the steps of: determining whether the floating point type numeric database value is positive, in response to a determination that the floating point type numeric database value is positive, performing the steps of: inverting a sign bit, and converting the floating point type numeric database value from the binary representation to a hexadecimal representation, in response to a determination that the floating point type numeric database value is not positive, performing the steps of: inverting each of the plurality of bits, and converting the floating point type numeric database value from the binary representation to the hexadecimal representation; and in response to a determination that the numeric database value is a decimal type numeric database value, performing the steps of: determining whether the decimal type numeric database value is positive, in response to a determination that the decimal type numeric database value is positive, performing the steps of: inverting the integer sign bit, converting the decimal type numeric database value from the binary representation to a decimal representation having a plurality of digits, and inverting each of the plurality of digits, in response to a determination that the decimal type numeric database value is not positive, performing the steps of: inverting the sign bit, and converting the decimal type numeric database value from the binary representation to a decimal representation having a plurality of digits, wherein the steps of converting the integer type, floating point type, and decimal type numeric database values comprises appending a sub-code to each of the numeric database values to enable the numeric database values to be sorted by numeric data type.