Why not CAST?

Select SUM(CAST(option_price AS DECIMAL) * QUANTITY) as merch_charge



-----Original Message-----
From: Rick Root [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 12, 2006 11:53 AM
To: CF-Talk
Subject: Re: Query of Queries

I ran this query and got a different error:

        select
                SUM((OPTION_PRICE+0)) AS MERCH_CHARGE
        FROM contents

Cannot mix types "VARCHAR" and "BIGINT" in a "+" binary operation

so it looks like for some reason, coldfusion things "OPTION_PRICE" is a
varchar, even though the column type in the database is "DECIMAL(10,2)"

Rick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240362
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

Reply via email to