Subject | Re: [firebird-support] Procedure Problem, Div By 0 |
---|---|
Author | Spiros Bibilas |
Post date | 2003-08-12T14:26:25Z |
Include and this.
(ENH.TestedValue is not null) and (ENL.TestedValue not not null)
(ENH.TestedValue is not null) and (ENL.TestedValue not not null)
----- Original Message -----
From: andyh20012003
To: firebird-support@yahoogroups.com
Sent: Thursday, August 07, 2003 8:23 PM
Subject: [firebird-support] Procedure Problem, Div By 0
I need some help, I keep getting an error of division by zero
and I dont know how to get around it.
I am trying to filter one table by comparing values of two different
rows. If these values are more than 2 percent off they will be
includes in the query. This query will indicate all of my bad
failures, later I will mark these bad.
I am using interbase 5.5
Any help would be great
Thank Andy
Code Below
CREATE PROCEDURE EACHNODE_NETLIST_2
RETURNS (
EHTESTEDVAL DOUBLE PRECISION,
EHNODE INTEGER,
EHSUB INTEGER,
EHCIR INTEGER,
ELTESTEDVAL DOUBLE PRECISION,
ELNODE INTEGER,
ELSUB INTEGER,
ELCIR INTEGER)
AS
begin
for
select ENH.TestedValue,
ENH.Node,
ENH.SubstrateNum,
ENH.CircuitNum,
ENL.TestedValue,
ENL.Node,
ENL.SubstrateNum,
ENL.CircuitNum
From EachNode ENH, EachNode ENL
Where
(ENH.JobNum = "2621") and
(ENH.ProberNum = 1) and
(ENL.JobNum = "2621") and
(ENL.ProberNum = 1) and
((ENH.Passed = 1) or (ENL.Passed = 1)) and
(ENH.SubstrateNum = ENL.SubstrateNum ) and
(ENH.CircuitNum = ENL.CircuitNum) and
(ENH.Node = 2) and
(ENL.Node = 92) and
(
((ENH.TestedValue != 0) and (ENL.TestedValue != 0))
and
(
((ENH.TestedValue/ENL.TestedValue)>0 ) and
( (100 -((ENH.TestedValue/ENL.TestedValue)
*100)) > (100 - 98))
or(
(ENL.TestedValue/ENH.TestedValue)>0 ) and
( (100 -((ENL.TestedValue/ENH.TestedValue)
*100)) > (100 - 98))
)
)
Into :EHTestedval, :EHNode, :EHSub, :EHCir, :ELTestedVal, :ELNode, :E
LSub, :ELCir
do suspend;
end
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]