Q: format for convert

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

SELECT name + ‘- ‘ + CONVERT(varchar,amt) as ddlCap from myTable

How can I get amt be like “#0.00†format in ddlCap?
 
Not sure why you'd do that in SQL. Consider pulling 2 separate columns,
Name and Amt (why abbreviate???) and let your presentation layer take care
of formatting.

(a)ASP.Net is much more capable of formatting than SQL
(b)It makes your query more reusable/flexible because it only pulls raw data
and can be formatted any way you want..

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top