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

Home -> Community -> Usenet -> c.d.o.server -> Re: Division by zero: how to handle?

Re: Division by zero: how to handle?

From: <ctcgag_at_hotmail.com>
Date: 05 Jun 2003 15:46:14 GMT
Message-ID: <20030605114614.823$4y@newsreader.com>


Norman Dunbar <Norman.Dunbar_at_lfs.co.uk> wrote:
> Try this which works, you get the error message but the script continues
> onwards :
>
> SQL>ed fred.sql
>
> whenever sqlerror continue none
>
> select 1/1 from dual;
> select 'ok' from dual;
> select 1/0 from dual;
> select 'finished' from dual;
> <exit editor & save>

Is there something like that for within a single query?

select 1/(rownum-5) from tab; -- as a user with > 5 tables

The whole query aborts, rather than just ignoring the row that would have an error.

regards,

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB
Received on Thu Jun 05 2003 - 10:46:14 CDT

Original text of this message

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