Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> scriprt error

scriprt error

From: Shawn <spedwards_at_qwest.net>
Date: Sun, 23 Nov 2003 10:55:20 -0700
Message-ID: <Ov6wb.60$dW4.32652@news.uswest.net>


Hi,

I run this report daily that includes the following script to perform some calculations.

select count(distinct ev_id) eventtotal from invopt_acty,inv_pull,std_invopt
where invopt_acty.ivpl_id = inv_pull.id

and             inv_pull.sdio_id=std_invopt.id
and             inv_pull.effdate =

decode(pull_level,'G','&&unwrapped','S','&&wrapped')
/

select count(distinct ev_id) eventlate
from work_glrp,event,std_invopt
where ivpl_effdate = decode(pull_level,'G','&&unwrapped','S','&&wrapped')
and             work_glrp.sdio_id = std_invopt.id
and     work_glrp.ev_id = event.id
and     (gain_loss_rsn_code not in ('NR','NC','NT')
or      gain_loss_rsn_code is null)

/

select 'EVENTS PULLED LATE VS TOTAL EVENTS' c,

    &eventlate num,&eventtotal den,((&eventlate/&eventtotal)*100) rate from dual

The problem I have is when the variable comes out to zero (which happens infrequently) it kills the last part of the script with this error:

num,-2173941.5 den,((/-2173941.5)*100) rate

                      *

ERROR at line 6:
ORA-00936: missing expression

I can't seem to get around it. Any suggestions would be greatly appreciated.

Shawn Received on Sun Nov 23 2003 - 11:55:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US