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 |
|
jennypretty
Yak Posting Veteran
96 Posts |
Posted - 2004-11-02 : 11:16:28
|
| HELLO friends,I was trying to convert a number with 4 digits to the right, but it shows errors.This is my Emp tableEmp_Percent-----------0.2818000020.87290220.47820000000278HOW TO CONVERT THIS TO 4 digits to the right? like:0.28180.87290.4782Big thanks.Jenny.The stupid question is the question you don't ask.www.single123.com |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-11-02 : 11:23:08
|
Select convert(money,Emp_Percent) From EmpCorey |
 |
|
|
jennypretty
Yak Posting Veteran
96 Posts |
Posted - 2004-11-02 : 12:12:19
|
| Woh, it worked. How about this?Emp_Percent-----------10.87290220.47000000001HOW TO CONVERT THIS TO 4 digits to the right? if a number have 00000 at the end, it must stop at the ist zero, and, if number 1 only, then it should not add any zero at the end.10.87290.47Please help.Jen.The stupid question is the question you don't ask.www.single123.com |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-11-02 : 12:21:33
|
| see the str function.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|