Is it a problem in the ColdFusion code rather than the SQL? I can't see where you're doing any division in the code below.
Have you got the CF code for us to see? Ade -----Original Message----- From: Eric J. Hoffman [mailto:[EMAIL PROTECTED] Sent: 23 March 2005 20:05 To: CF-Talk Subject: divide by zero error Overview: run a cold fusion query against a datasource. Get a divide by zero error. Take that query in SQL Query analyzer and type in the query substituting values and it works fine. All values being input by cold fusion appear correct as well. Can anyone identify where to look in this instance? IN case it helps, resultant query: Select DISTINCT customer.id as cid, customer.business, customer_orders.id, SUM (customer_orders_prod.qty) as totunits FROM customer_orders JOIN customer on customer.id = customer_orders.customer_id JOIN customer_contact on customer.id = customer_contact.customer_id LEFT OUTER JOIN customer_orders_prod on customer_orders.id = customer_orders_prod.order_id JOIN inventory on customer_orders_prod.product_id = inventory.service_id WHERE customer_orders.orderdate BETWEEN '1/1/05' AND '3/1/05' AND customer_orders_prod.product_id = 101 AND customer_orders_prod.qty >= 1 AND customer.state = 'MN' AND (phone LIKE '%952%' OR phone LIKE '%651%' or Phone like '%763%' or Phone like '%612%') AND (business NOT LIKE '%HSR%' AND business NOT LIKE '%OSR%' AND business NOT LIKE '%HAS%' AND business NOT LIKE '%HAM%') AND customer.category <> 5 GROUP BY customer_orders.id, customer.id, business -------------------------------------------------------- Eric J. Hoffman -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.0 - Release Date: 21/03/2005 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199798 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

