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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Error checking in Views..

Re: Error checking in Views..

From: David Turner <dturner_at_linuxcare.com>
Date: Fri, 19 May 2000 06:16:38 -0700
Message-Id: <10502.106100@fatcity.com>

--------------48F48298ABC6298686E8970E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

If you're running on 8 or above you can use instead of triggers.

Dave Turner

Venugopal V V S wrote:

> Hello *
>
> 1. I am trying to develop a data table view that will allow me to view
> the data indicated below.
>
> 2. The view works, and I can get the correct data, but it does not
> include any "Error Checking". I am looking for ways to validate keyboard
> input using the view . Any help rendered is greatly appreciated.
>
> Thank you ....
> Venu
>
> CREATE VIEW vState
> AS SELECT boid, bex, phone, orderdate, ORDERNUB, AVAILID,DECODE(0,
> INSTR(SUBSTR(boid, 1, 1), '0123456789'), 'NOT A NUMBER',
> INSTR(SUBSTR(boid, 2, 1), '0123456789'), 'NOT A NUMBER',
> INSTR(SUBSTR(boid, 3, 1), '0123456789'), 'NOT A NUMBER',
> DECODE(boid, '001', 0, 1), 'ARKANSAS',
> DECODE(boid, '002', 0, 1), 'ARKANSAS',
> DECODE(boid, '003', 0, 1), 'ARKANSAS',
> DECODE(boid, '004', 0, 1), 'ARKANSAS',
> DECODE(boid, '007', 0, 1), 'ARKANSAS',
> DECODE(boid, '012', 0, 1), 'ARKANSAS',
> DECODE(boid, '030', 0, 1), 'MISSOURI',
> DECODE(boid, '035', 0, 1), 'MISSOURI',
> DECODE(boid, '036', 0, 1), 'MISSOURI',
> DECODE(boid, '050', 0, 1), 'OKLAHOMA',
> DECODE(boid, '055', 0, 1), 'OKLAHOMA',
> DECODE(boid, '060', 0, 1), 'TEXAS',
> DECODE(boid, '131', 0, 1), 'TEXAS',
> DECODE(boid, '231', 0, 1), 'TEXAS',
> DECODE(boid, '065', 0, 1), 'NORTH CAROLINA',
> DECODE(boid, '612', 0, 1), 'NORTH CAROLINA',
> DECODE(2, DECODE(SIGN(TO_NUMBER(boid) - 613), 1, 0) +
> DECODE (SIGN(675 - TO_NUMBER(boid)), 1, 0), 0, 1), 'GEORGIA', 'UNKNOWN')
> STATE
> FROM MYTEST
>
> --
> Author: Venugopal V V S
> INET: venug_at_cse.iitb.ernet.in
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

--
Dave Turner, Senior Database Administrator, Linuxcare, Inc.
913.383.3052 tel, 913.579.3803 cel, 877.443.9553 pager
dturner@linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.
--



--------------48F48298ABC6298686E8970E
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
If you're running on 8 or above you can use instead of triggers.
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Dave Turner
<p>Venugopal V V S wrote:
<blockquote TYPE=CITE>Hello *
<p>1. I am trying to develop a data table view that will allow me to view
<br>the data indicated below.
<p>2. The view works, and I can get the correct data, but it does not
<br>include any "Error Checking". I am looking for ways to validate keyboard
<br>input using the view . Any help rendered is greatly appreciated.
<p>Thank you ....
<br>Venu
<p>CREATE VIEW vState
<br>AS SELECT boid, bex, phone, orderdate, ORDERNUB, AVAILID,DECODE(0,
<br>INSTR(SUBSTR(boid, 1, 1), '0123456789'), 'NOT A NUMBER',
<br>INSTR(SUBSTR(boid, 2, 1), '0123456789'), 'NOT A NUMBER',
<br>INSTR(SUBSTR(boid, 3, 1), '0123456789'), 'NOT A NUMBER',
<br>DECODE(boid, '001', 0, 1), 'ARKANSAS',
<br>DECODE(boid, '002', 0, 1), 'ARKANSAS',
<br>DECODE(boid, '003', 0, 1), 'ARKANSAS',
<br>DECODE(boid, '004', 0, 1), 'ARKANSAS',
<br>DECODE(boid, '007', 0, 1), 'ARKANSAS',
<br>DECODE(boid, '012', 0, 1), 'ARKANSAS',
<br>DECODE(boid, '030', 0, 1), 'MISSOURI',
<br>DECODE(boid, '035', 0, 1), 'MISSOURI',
<br>DECODE(boid, '036', 0, 1), 'MISSOURI',
<br>DECODE(boid, '050', 0, 1), 'OKLAHOMA',
<br>DECODE(boid, '055', 0, 1), 'OKLAHOMA',
<br>DECODE(boid, '060', 0, 1), 'TEXAS',
<br>DECODE(boid, '131', 0, 1), 'TEXAS',
<br>DECODE(boid, '231', 0, 1), 'TEXAS',
<br>DECODE(boid, '065', 0, 1), 'NORTH CAROLINA',
<br>DECODE(boid, '612', 0, 1), 'NORTH CAROLINA',
<br>DECODE(2, DECODE(SIGN(TO_NUMBER(boid) - 613), 1, 0) +
<br>DECODE (SIGN(675 - TO_NUMBER(boid)), 1, 0), 0, 1), 'GEORGIA', 'UNKNOWN')
<br>STATE
<br>FROM MYTEST
<p>--
<br>Author: Venugopal V V S
<br>&nbsp; INET: venug_at_cse.iitb.ernet.in
<p>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp;
FAX: (858) 538-5051
<br>San Diego, California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --
Public Internet access / Mailing Lists
<br>--------------------------------------------------------------------
<br>To REMOVE yourself from this mailing list, send an E-Mail message
<br>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
<br>the message BODY, include a line containing: UNSUB ORACLE-L
<br>(or the name of mailing list you want to be removed from).&nbsp; You
may
<br>also send the HELP command for other information (like subscribing).</blockquote>

<pre>--
Dave Turner, Senior Database Administrator, Linuxcare, Inc.
913.383.3052 tel, 913.579.3803 cel, 877.443.9553 pager&nbsp;
dturner@linuxcare.com, <A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A>
Received on Fri May 19 2000 - 08:16:38 CDT

Original text of this message

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