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 |
anupalavila
Yak Posting Veteran
56 Posts |
Posted - 2009-03-25 : 01:47:10
|
Hai In my table I have a field amt which is numeric with length 9 and scale 2 , in it I have values like 300.00245.45569.00222.23How can I make selection such that I can get values such as300245.45569222.23ie, if the decimal portion is .00 avoid the decimal portionThanks and Regards Anu Palavila |
|
sunil
Constraint Violating Yak Guru
282 Posts |
Posted - 2009-03-25 : 02:12:25
|
Its advisable that formatting is done in front end. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-03-25 : 03:29:16
|
quote: Originally posted by anupalavila Hai In my table I have a field amt which is numeric with length 9 and scale 2 , in it I have values like 300.00245.45569.00222.23How can I make selection such that I can get values such as300245.45569222.23ie, if the decimal portion is .00 avoid the decimal portionThanks and Regards Anu Palavila
Where do you want to show data?MadhivananFailing to plan is Planning to fail |
|
|
anupalavila
Yak Posting Veteran
56 Posts |
Posted - 2009-03-25 : 04:04:36
|
I am trying to show the data in report.rdlc doc in .Net 2005Thanks and Regards Anu Palavila |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-03-25 : 10:05:09
|
Try this..SELECT REPLACE(CONVERT(VARCHAR,amt),'.00','') from urtable |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-03-25 : 10:06:50
|
or even just SELECT REPLACE(amt,'.00','') from urtable |
|
|
|
|
|