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 |
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2010-10-13 : 13:25:17
|
| Dear All,I am trying this query and getting 0 but actually value should comePlease helpUpdate Table set OP=convert(float,CA)-Convert(Float,PA)OP is floatCA is floatPA is floati tried below query and getting same 0 valueUpdate Table set OP=CA-PA |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-10-13 : 13:52:57
|
Do you have example values? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2010-10-14 : 05:28:56
|
| Why are you using float? Float is uses what is called appoximation for and could leave you with inaccurate results. Use decimal instead...- LumbagoMy blog (yes, I have a blog now! just not that much content yet) -> www.thefirstsql.com |
 |
|
|
|
|
|