Hey Manasa,
It may not be null, but still be 0.
you can use a check constraint, if you want to prevent (always) the sum of
columns from being equal to zero.
Anat :o)
----- Original Message -----
From: "Manasa " <oracledba-ezmlmshield-x5392833.[Email address protected]
To: "LazyDBA Discussion" <[Email address protected]
Sent: Thursday, May 11, 2006 3:28 PM
Subject: Sql error - ORA-01476: divisor is equal to zero
> Following query is giving me the divisor is equal to zero error even
> though I have this criteria in the where clause- AND (pre_reg_occur IS
> NOT NULL AND subm_occur IS NOT NULL)
>
> What am I missing here. Appreciate any suggestions.
>
> ThankYou,
> Manasa.
>
>
> SELECT 'B',
> W.TITLE, value_string, SUM(pre_reg_dur + subm_dur)/
> SUM(pre_reg_occur + subm_occur)
> FROM L,
> S,
> SAV,
> W
> WHERE l.SCRIPT_ID IN (SELECT ID FROM S WHERE ROWNUM < 521 ) AND
> L.SCRIPT_ID = s.ID
> AND sav.SCRIPT_ID = S.ID
> AND sav.ws_id = w.ID
> AND s.ws_id = w.ID
> AND w.ID = 4
> AND sav.ATTR_TYPE_ID IN ( SELECT ID FROM ATTR_TYPE WHERE KEY =
> 'script.submitters')
> AND l.active_cycle ='T'
> AND (pre_reg_occur IS NOT NULL AND subm_occur IS NOT NULL)
> GROUP BY W.TITLE, sav.value_string
>
>
>
> --------
> website: http://www.LazyDBA.com
> Please don't reply to RTFM questions
> Oracle documentation is here: http://tahiti.oracle.com
> To unsubscribe: see http://www.lazydba.com/unsubscribe.html
> To subscribe: see http://www.lazydba.com
> By using this list you agree to these
> terms:http://www.lazydba.com/legal.html
>
>
>
Oracle LazyDBA home page