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 |
|
jung1975
Aged Yak Warrior
503 Posts |
Posted - 2004-08-12 : 22:01:09
|
| I have a column AA---103.00101.102.01111.0123.98I would like to get rid of .00 and .0so, the output should look likeA--103.101.102.01111.123.98Should I use a CASE statement for this case? |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-08-12 : 22:07:07
|
| Why can't you do the formatting in your presentation layer? |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2004-08-13 : 03:41:05
|
| Data formatting is always done in the presentation-layer but it does look kind of strange. Is ColumnA some sort of string? If they were numbers (like decimal(6, 2)) I belive they would all be stored with two decimals...hm, maybe not... |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-08-13 : 05:33:46
|
| maybe something like this:select replace(field, '.00', '.')from MyTablewhere field like '%.00'select replace(field, '.0', '.')from MyTablewhere field like '%.0'Go with the flow & have fun! Else fight the flow :) |
 |
|
|
|
|
|