[dba-SQLServer] Formatting Numbers IN SQL

Debbie Elam delam at zyterra.com
Tue Sep 16 12:37:15 CDT 2008


Since SQL is a backend only, this sort of formatting is not generally handled there.  Access does formatting at the table level because it is also a front end and can pass that seamlessly.

Just set the data type to integer if you do not want any decimals to be stored.  Otherwise, set the format at the front end.

Debbie 

-----Original Message-----
From: David Emerson <newsgrps at dalyn.co.nz>
Sent: Tuesday, September 16, 2008 12:19 PM
To: dba-SQLServer at databaseadvisors.com
Subject: [dba-SQLServer] Formatting Numbers IN SQL

Since I didn't get a reply I will try another tact.

There doesn't seem to be an SQL equivalent to the Access 
Format(12345,"#,##0").  What is the simplest way of taking a number 
like 12345.00 and converting it to a varchar "12,345"?


Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand  

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com







More information about the dba-SQLServer mailing list