For those that care.... I decided to use the first query, and do the calculations in ColdFusion. Gave me the same results as SQL.
On my way to becoming bald, I added a trim to the ColdFusion code. Boom, it started working as expected. Could there be extra spaces in the field? I wouldn't have thought so (It is an real field) but I suppose that may be the case. At 04:43 PM 3/3/2005, you wrote: > I have a table: > >LogDigest (UserID, ProgramID, Goal, WOY) > >(WOY = Week of Year ) > >If I run this query: > >select Goal >from logdigest >where userID = 50044 and > programID = 1 and > WOY < 10 > > >Two rows are returned. 2.8 and 2.8 . Add them together and I should get >5.6, right? > >If I run this query: > >select sum(goal),1) as totalgoal >from logdigest >where userID = 50044 and > programID = 1 and > WOY < 10 > >The TotalGoal value ireturned s 5.59999990463 > > > Why isn't 5.6 returned? I even tried rounding the total goal, but still >get the same above value. > > ( The data type for Goal is "real" and the DB is SQL Server 2000 ) > > >-- >Jeffry Houser, Web Developer, Writer, Songwriter, Recording Engineer >AIM: Reboog711 | Phone: 1-203-379-0773 >-- >My Books: <http://www.instantcoldfusion.com> >My Recording Studio: <http://www.fcfstudios.com> >-- >When did Reality Become TV > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2196 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
