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 -> Re: basic sql help please

Re: basic sql help please

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 25 Nov 2002 10:46:09 -0600
Message-ID: <u7kf11txj.fsf@standardandpoors.com>


On Mon, 25 Nov 2002, rick_at_ricks-web.info wrote:
> Working in sql+ for 9i. I am trying to figure out some sql
> things.
>
> 1. Can I delete a record from multiple tables at once somehow
> ex. Delete From table1, table2, table3 Where SSN =XXXXX;

You can create a view on these tables and then create an instead of trigger to delete rows out of each of them.

> 2. how can I check the first three numbers of a field of 10
> (it's a phone num) to replace all instances of one set of
> numbers with another. The purpose here is to replace the area
> code (digits 1-3) with a different set for all instances in the
> relation.

You could probably get there with TRANSLATE and REPLACE combined with PL/SQL.

-- 
Galen Boyer
Received on Mon Nov 25 2002 - 10:46:09 CST

Original text of this message

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