|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Display data in decimal format
In a table, i have a nvarchar field (Pieces), which consists of data like: 96.126921
I would like the data to be returned to 1 decimal place. At the moment the syntax i have is: SUM(CAST(PIECES AS numeric)) I think i need to replace 'numeric' with 'decimal' but dont know the correct syntax. Anyone help?? Thanks. |
|
#2
|
|||
|
|||
|
Hello,
Try this queries for ur problem, select convert(decimal(10,1),'123.45') or select SUM(CAST('123.45' AS decimal(10,1))) |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Display data in decimal format |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|