Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a SQL Select string 1

Status
Not open for further replies.

Arnold

Programmer
Jul 2, 1999
32
NL
I have a SELECT statement in Access 2000 that contains the following:<br>Format([UnitPrice]/[Weight],'$0.0000') AS expr1<br><br>I am looking for an equivalent in SQL Server, but have yet to find it.&nbsp;&nbsp;The SELECT statement is the source for a ListBox in an Access 2000 Project.<br><br>Any ideas on how I could format the column in the list box to have a $ and display 4 decimal places?&nbsp;&nbsp;If the number is like &quot;3.34&quot;, I want it to format to &quot;$3.3400&quot;.<br><br>Thanks for your help!<br>Arnold
 
The closest I could come is:<br><br><FONT FACE=monospace>select convert(money, 3.34)</font><br><br>Obviously, you'd replace &quot;3.34&quot; with your expression or column. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top