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 |
|
sqldba20
Posting Yak Master
183 Posts |
Posted - 2010-03-05 : 14:34:28
|
| Folks:I have this float values in one of the columns of a table:89.645660.111620.511580.26798.889900I want to select the float values and then add Zero '0' at the end. The total character should not exceed ten (10). Here is the output should look like: How can I do that in a select statement?89.645600060.11162000.511580000.2670000098.8899000Thanks ! |
|
|
sqldba20
Posting Yak Master
183 Posts |
Posted - 2010-03-05 : 14:49:01
|
| Nevermind.. I got it....LEFT(CONVERT(VARCHAR,COLUMNNAME)+'0000000000', 10)Thanks ! |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2010-03-05 : 15:07:29
|
What's wrong with STR function?SELECT STR(0.267, 10, 8)SELECT STR(89.6456, 10, 8) N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|
|