formatting numbers

  • when dealing with numbers greater than 1000.00,(such as 32501.00) how do i format the number with commas and dollar signs (ie., $32,501.00)?

    thanks

  • If you are not storing as money datatype then try changing the datatype of the field or

    CAST(fldName AS money)

    Or use smallmoney based on your maximum amount. See datatypes in SQL Books Onlie for more detail about each.

  • Use the covert command and a style of 1

    eg.

    CONVERT (CHAR(15),variable_name, 1)

    William H. Hoover

    Louisville, Ky

    sweeper_bill@yahoo.com


    William H. Hoover
    Louisville, Ky
    sweeper_bill@yahoo.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply