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 |
|
guptaalok12
Starting Member
5 Posts |
Posted - 2009-09-03 : 05:32:06
|
| i have decimal field in table.Whenever i select rocords from table.it gives in decimal.But i want when data is(12.00) it should give (12) not (12.00).How i will get it.T1==X 12.50y 54.00Z 78.80Q 23.00Select * from T1Oouput shold be==X 12.50y 54Z 78.80Q 23alokgupta |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-09-03 : 05:36:06
|
It would be better to do this in your front end app.But else I would tryreplace(convert(varchar(10),dec_col),'.00','') No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-03 : 06:06:42
|
quote: Originally posted by guptaalok12 i have decimal field in table.Whenever i select rocords from table.it gives in decimal.But i want when data is(12.00) it should give (12) not (12.00).How i will get it.T1==X 12.50y 54.00Z 78.80Q 23.00Select * from T1Oouput shold be==X 12.50y 54Z 78.80Q 23alokgupta
Where do you want to show data?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|