PDA

View Full Version : Access Format vs SQLS Convert



Imdabaum
10-27-2010, 03:57 PM
In MS Access I can do a format(Var, "#,###") and get a var with value 1000 expressed as 1,000. I've googled the format and it says that the equivalent for Format in SQLS2005 is convert. But what parameter ensures that a comma separates the ever 3 digits from the decimal?

What if I want 3 0s instead of 4 as comes by converting to 'money', style=2?
Can I define my own formatting/converting styles?

stanl
10-28-2010, 12:15 PM
Just .02:dunno , but since SQL Server is more for storage than display, you pretty much have to either write your own format udfs (there are plenty of samples available to download) or link the tables to Access and use it as a front end. In a few weeks I'll be working fully with SQL Server Express 2008 (which I'm impressed with), and can share some UDFs. Stan