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 |
|
shah
Starting Member
5 Posts |
Posted - 2007-06-28 : 08:21:34
|
| Dear Experties,i have a doubt...In credit amount field i need to add "0.Value" if its start with '.00'or ".345" then "0.345"Ex:create table xxx(name varchar(20),salary decimal(34,4))insert into xxx values('dee',0)then the output vl bname salarydee .0000but i want it to b "0.0000"how can i do thisThanks in advanceshah |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-28 : 09:01:50
|
| What is the datatype of that column?MadhivananFailing to plan is Planning to fail |
 |
|
|
shah
Starting Member
5 Posts |
Posted - 2007-06-28 : 09:06:09
|
| decimalshah |
 |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2007-06-28 : 21:47:49
|
| It's a presentation issue - the value is correct so you should do it in the front end unless you want to convert it to a string (which would be totally the wrong thing to do). |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-29 : 00:05:12
|
| Yes. If you want to show them in front end, do formation there. Or you can cast it to FLOAT datatypeMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|