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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with Round(val, dig)

Status
Not open for further replies.

ThatRickGuy

Programmer
Oct 12, 2001
3,841
US
Heya!
I'm having a problem with the Round function in Sybase 12.5.

In SQL Advantage I'm running a query that is checking for inequality between two values. The problem is these numbers are differing by 0.0000000000000004. So I put them both in a Round call:

Code:
ROUND(STBD.STAX,2) <> ROUND(aamt_b_d,2)

but even with the round, they are showing up as inequal.

I can change the query to check for a difference less than .001 instead of equality, but it definatly seems to be some very odd behavior.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top