Friday, February 17, 2012

display numbers in a specific format

how can i display numbers in a specific format
like function: format(Num,"#,###") in msaccess?
thanksYour client application controls how numbers are displayed. SQL Server
has no control over that so you need to refer to whatever client /
presentation app you are using (you didn't specify).
The only way to do that from SQL would be to return the number as a
string (not really a good idea). Lookup CONVERT in Books Online if you
want to know how to do that.
David Portas
SQL Server MVP
--|||There is no such format in SQL Server. As David says, this is usually
controlled by the client application and/or the regional settings or
preferences of the end user.
If you really feel strongly enough that SQL Server should do this for you
(you may have compelling reasons), then you can use CONVERT() or STR().
Both are documented in Books Online.
"Sam" <focus10@.zahav.net.il> wrote in message
news:eHv7pvH4FHA.1416@.TK2MSFTNGP09.phx.gbl...
> how can i display numbers in a specific format
> like function: format(Num,"#,###") in msaccess?
> thanks
>
>

No comments:

Post a Comment