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 |
|
Johnyalm
Starting Member
49 Posts |
Posted - 2005-05-27 : 06:33:20
|
| I would like to convert (or insert blanks) numbers for readability like this example:1000000.99 shall go like this 1 000 000.99This is only for readability - its for sure easier to read and interpret the million in the converted way!Is there a good way to do this?www.mirrorgate.com |
|
|
Johnyalm
Starting Member
49 Posts |
Posted - 2005-05-27 : 06:35:42
|
| I would like to do this in a function so that the server can deliver floats as string formatted in the way i described.www.mirrorgate.com |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-05-27 : 06:51:49
|
| If possible do it in the presentation layer.If you use VB6, thenformat(number,"# ### ###.00")MadhivananFailing to plan is Planning to fail |
 |
|
|
Johnyalm
Starting Member
49 Posts |
Posted - 2005-05-27 : 10:05:39
|
| Sorry, maybee it is not possibly beacuse we use a semilanguage that we do not have control over so it cannot be done in the presentation layer, has to be done in the query !www.mirrorgate.com |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-05-27 : 10:16:31
|
would this work for you?declare @var moneyset @var = 1000000.99select convert(varchar(50), @var, 1)Go with the flow & have fun! Else fight the flow |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-05-27 : 10:49:46
|
| Yes, it will work. To have space use thisselect replace(convert(varchar(50), @var, 1),',',' ')MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|