Home > Ask the SQL Server Experts > Michael Hotek Questions & Answers > 'Format' in SQL Server
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

'Format' in SQL Server

Michael Hotek EXPERT RESPONSE FROM: Michael Hotek

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 21 January 2004

I am trying to build an application, which will work on MS Access and SQL Server. I have some queries written by someone using the Visual Basic "FORMAT" function. I didn't find anything that will be compatible with "Format" in SQL Server. "Cast/Convert" can't solve this issue.

Sample Statements:

Select Format(Amt, "###,##.##") as Amount from Table A

Select "Balance: " & Format(Amt, "###,##.##") as Amount from Table A
Any advice other than to change the current statements?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Michael Hotek
Applying LDF file to MDF without turning it to .BAK first?
Procedure for finding last modified info?
Migrating poorly designed database to new, normalized one
Displaying decimal places in SQL Server 2000
Creating a DTS package
Money data type conversion issue using DTS
Extracting data without strings converted to strange characters
Any way to alias a call to functions?
Repairing corrupt MDF files
Memory usage by different databases

More SQL Server Expert Responses
Applying LDF file to MDF without turning it to .BAK first?
Any way to alias a call to functions?
"Max connections reached" error
Application freezes for 30 seconds on VPN
Adding column and changing datatype
Converting varchar columns to text data type
Adding new column to table that is part of replication
Any issues with linking 7.0 and 2000 databases?
Accessing SQL Server databases on an intranet with VB.NET
Building nested tables in SQL Server?

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


You are trying to do 2 diametrically opposite things. The format commands are for data display. SQL Server is a storage engine and does absolutely nothing with formatting nor does it have any capability to format for an application. Formatting is done in SQL Server at the application side and does not involve the database engine. There are no equivalents or translations for that kind of thing.

For More Information




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts