Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: basic sql help please
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 BoyerReceived on Mon Nov 25 2002 - 10:46:09 CST
![]() |
![]() |