| Author |
Topic |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2011-10-10 : 04:02:24
|
| Stored proc returns data with 2 decimal places i.e.select field1 = round(field1, 2), etc...The data is shown as 2.45 or 1.5, etc...If the rounding is 1.50, the system shows it as 1.5Is there a way to show 1.50 if the rounding gives an answer of 1.5or 1.60 if the rounding gives 1.6 ?Thanks |
|
|
micnie_2020
Posting Yak Master
232 Posts |
Posted - 2011-10-10 : 04:05:42
|
| selectfield1 = cast(round(1.5, 2)AS decimal(10,2)) |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2011-10-10 : 04:16:13
|
| You should really leave formatting to the front end application...- LumbagoMy blog-> http://thefirstsql.com/2011/07/08/how-to-find-gaps-in-identity-columns-at-the-speed-of-light/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-10 : 04:33:59
|
| you've Format function available in reporting services which you can use for this.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2011-10-10 : 04:38:51
|
quote: Originally posted by visakh16 you've Format function available in reporting services which you can use for this.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Hi,Do you mean in SSRS, the Use regional formatting under Number section in TextBox Properties? |
 |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2011-10-10 : 04:40:50
|
quote: Originally posted by visakh16 you've Format function available in reporting services which you can use for this.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Remember that I would like to show 2.30% if the result is 2.3% |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-10 : 04:46:17
|
| you've Format function available, not standard formats inside cell propertiestry something like=Format(Round(Fields!YourField.value,2),"##0.00")------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2011-10-10 : 13:00:20
|
| Thanks |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-10 : 14:37:06
|
| wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|