Skip to main content
Participant
September 7, 2008
Question

<cfgrid> display strips leading 0

  • September 7, 2008
  • 1 reply
  • 258 views
I have a table with a column that is defined as varchar(30) (MS SQL Server 2005). Probably 99% of the values in the column are numeric, but the value can also include an alpha character. Most of the values are three numeric characters , such as 003, 058, or 792. However, the value can be any number of characters (e.g., 0000885 or CRO549),

The values are correctly stored in the database tables with the leading 0's intact. When I make my query and display the results in a <cfgrid> form, if the value in the table has characters that are all numeric, the leading 0's are stripped. Is there a way to make the display to not delete the leading 0's?

If the value in the table has at least one alpha character in it, the leading 0'sare not stripped when displayed.
    This topic has been closed for replies.

    1 reply

    Inspiring
    September 7, 2008