Link to home
Start Free TrialLog in
Avatar of feesu
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,PriceIndex) + ' (' + convert(nvarchar,dbo.Client_Online_Indices.Change) + ')   '  AS Total

The problem is that i get a wrongly formatted output:
P_Index:  1.45448e+007

I need the numbers to look properly!
Avatar of patrikt
patrikt
Flag of Czechia image

Look for CONVERT help. There is third parameter whch specifies format.
Avatar of feesu
feesu

ASKER

Couldn't find it.
ASKER CERTIFIED SOLUTION
Avatar of patrikt
patrikt
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of feesu

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.
Avatar of feesu

ASKER

OK! Thanks alot.