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 |
gpc44
Starting Member
35 Posts |
Posted - 2013-02-05 : 15:26:49
|
Hello,I want to convert float values ??in Char-format (5.2)3 digits before / 2 digits after. Without dot or comma and leading zero-values??:0.12 = 000122.3 = 0023012.3 = 01230123.4 = 123402 = 00200NULL = 00000and on so ....Thank youreagardsNicole |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-02-05 : 16:27:50
|
[code]RIGHT('00000'+CAST(CAST(100*ISNULL(YourNumberColumn,0) AS DECIMAL(18,0))AS VARCHAR(32)),5)[/code] |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2013-02-08 : 07:25:19
|
If you want to show these in front end application, do the formation thereMadhivananFailing to plan is Planning to fail |
|
|
|
|
|