473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Q: format for convert

Hello,

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

How can I get amt be like “#0.00” format in ddlCap?
Nov 19 '05 #1
2 896
This is SQL Server iisue, not asp.net! Wrong group.

--
C# Dev
"JIM.H." wrote:
Hello,

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

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

Nov 19 '05 #2
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!)
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
Hello,

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

How can I get amt be like "#0.00" format in ddlCap?

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
1
by: faktujaa | last post by:
Hi, I have date in a string format like string strDate = "110204". Now i want to convert this string to MM/dd/yyyy format. How do i do this???? I used string.Format(strDate, "MM/dd/yyyy") but no...
3
by: stevek | last post by:
How do I format an integer. Add commas. 1234565 1,234,565 TIA
0
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
Hi all! I have a windows form that is bound to a dataset. Using VS 2005 & .NET Framework Beta 2. In my dataset I have a colum called Warranty that is a smallint on SQL Server 2000(SP4). ...
7
by: Alpha | last post by:
Hi, I'm maintaining C# code and am fairly new with C# programming. I'm looking for codes that's droping the 2nd digit of a nuber printed out and I suspect it's the code below. Can someone tell me...
4
by: Matt | last post by:
I'm trying to write a shared function that will convert all my phone numbers from format 1234567890 to (123) 456-7890. Here is my function that I wrote: Public Shared Function...
1
by: abcabcabc | last post by:
I write an application which can let user define own date format to input, How to convert the date string to date value with end-user defined date format? Example, User Defined Date Format as...
4
by: thomasc1020 | last post by:
This is regarding VB.NET 2003. Variable 'Date' is a string and it contains date information in this format: "DEC/05/2007". Now I am trying to convert the format as "2007-12-05". Is it...
5
by: sonu | last post by:
hey good morning ...... how to convert a video file in .flv format in php for linux hosting......is there any package whis provide this facility . Can i use ffmpeg for linux hosting...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.