Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kondurupraveen
Starting Member
6 Posts |
Posted - 2005-08-23 : 04:39:58
|
| hi all,I've used money datatype and when i retrieve the data from it to display it in a page then i get the value followed by a point and four zeros. i.e. if i have value 100 in that coloumn and when i print it in the page it is showing as 100.0000.I've tried using convert(varchar(50),coloumnname). I'm getting the correct result i.e 100.00. But i dont know whether the procedure is correct or wrong.the want the output as :if input is 100 then output should be 100:00Can plz someone help me.....anykind of response would be appreciated.Praveen |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-23 : 04:48:00
|
| Are you using report?If so, you can use Report's format method to format the numberIf you want to do this as SQL query then you need to convert it to decimal data typeDeclare @m moneySet @m=100select @m -- four ZeroesSelect cast(@m as decimal(12,2)) -- Two zeroesMadhivananFailing to plan is Planning to fail |
 |
|
|
kondurupraveen
Starting Member
6 Posts |
Posted - 2005-08-23 : 05:50:35
|
| Thanks Madhivanan |
 |
|
|
|
|
|