Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 divide by zero error

Author  Topic 

gamaz
Posting Yak Master

104 Posts

Posted - 2010-01-15 : 16:39:33
Hi,
I have the following formula which is given the above error

ROUND(((orders.qty / finished_parts.psets) * finished_parts.pqot_cyc) +
finished_parts.setuphrs, 2) AS EstRunHrs1


I would appreciate any help for resolution of the above. Thanks.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-01-15 : 16:41:25
ROUND((orders.qty * finished_parts.pqot_cyc / NULLIF(finished_parts.psets , 0) ) + finished_parts.setuphrs, 2) AS EstRunHrs1


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

gamaz
Posting Yak Master

104 Posts

Posted - 2010-01-15 : 17:02:47
Thanks so much for your help Peso. i appreciate it. It worked perfect.
Go to Top of Page
   

- Advertisement -