Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

absolute value of a float

Status
Not open for further replies.

cards4

Technical User
Dec 9, 2004
38
US
Hello,
I am trying to get the absolute value of a float in my SQL query. When I run ISQL to run the query and place the results in a text file, the number still remains as a number with decimals. I'm trying everything to get rid of the decimals. Please help! Thank you.
 
If you don't want decimals, then you should convert the value to integer.

Select Convert(Int, Abs(SomeField)) As SomeField
From SomeTable

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
That worked! Thank you very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top