Groups | Blog | Home
all groups > sql server programming > october 2005 >

sql server programming : adding commas into integer


dapdap
10/10/2005 11:50:02 PM
while selecting the field, I want it to be display with commas.
for example,
10000 become 10,000
without decimal placed at the end.
David Portas
10/11/2005 12:49:03 AM
Formatting is controlled by your client application, not by SQL Server. Ask
this question in a forum for the app or programming language you are using.

Certainly you could get SQL to return a string instead of a number but why
would you want to do that with the obvious disadvantages for performance,
complexity and special handling at the client?

--
David Portas
SQL Server MVP
--



[quoted text, click to view]
--CELKO--
10/11/2005 6:43:19 AM
[quoted text, click to view]

Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files. In a tiered architecture, the
display formatting is done in the front end and never in the database.

[quoted text, click to view]

A good SQL programmer avoids proprietary datatypes.
Uri Dimant
10/11/2005 9:38:50 AM
Take a look at DECIMAL datatype

[quoted text, click to view]

AddThis Social Bookmark Button