feesu
asked on
Numeric Output Format
Experts,
I'm trying to select a combination of text and numbers as below:
SELECT N' P_Index: ' + convert(nvarchar,PriceInde x) + ' (' + convert(nvarchar,dbo.Clien t_Online_I ndices.Cha nge) + ') ' AS Total
The problem is that i get a wrongly formatted output:
P_Index: 1.45448e+007
I need the numbers to look properly!
I'm trying to select a combination of text and numbers as below:
SELECT N' P_Index: ' + convert(nvarchar,PriceInde
The problem is that i get a wrongly formatted output:
P_Index: 1.45448e+007
I need the numbers to look properly!
Look for CONVERT help. There is third parameter whch specifies format.
ASKER
Couldn't find it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This worked, but insn't there a way to format those numbers?
No other way than specifiing number of decimal places.
Formating is normaly presentation layer function so SQL has no need to do this.
Formating is normaly presentation layer function so SQL has no need to do this.
ASKER
OK! Thanks alot.