Q: format for convert

G

Guest

Hello,

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

How can I get amt be like “#0.00†format in ddlCap?
 
K

Karl Seguin

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

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top