ABS(total) works fine for adding the numbers... Still that doesn't explain WHY I can't test for a negative number.
> -----Original Message----- > From: Dave Francis [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 22, 2005 3:18 PM > To: CF-Talk > Subject: Re: SIMPLE number conversion PROBLEM.... > > > Abs(total) ?? > > ----- Original Message ----- > From: "Jeff Waris" <[EMAIL PROTECTED]> > To: "CF-Talk" <[email protected]> > Sent: Tuesday, February 22, 2005 3:04 PM > Subject: SIMPLE number conversion PROBLEM.... > > > >I am using SQL Server 7 and have a "total" field that is a > Data Type of > >DECIMAL. In SQL server 7 Decimal and Numeric data types are > supposed to > >be equal. I am having a heck of time testing for negatives. > > > > For example... Say my field contains -41.00 and I want to test and > > convert it to 41.00. > > > > This should be easy: > > > > <cfif total LT 0> > > <cfset total = total * -1> > > </cfif> > > > > Why the heck doesn't the conversion or the test work??? Is > it that the > > data > > type is decimal instead of numeric?? Am I missing something > stupid... > > > > Thanks... Jeff. > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:4:195979 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

