Formatting in T-SQL

  • Is it possible, within SQL, to format a number the following

    old: 9123456.78

    new: 9,123,456.78

    Thanks,

    Michael

  • select convert( varchar(20), cast(9123456.78 as money), 1)

     


    * Noel

  • Yes there's a way as Noeld pointed out but why do you want to format your data like this?? this work is more often than not supposed to be done on the client instead of the server.

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

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