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: I Need Help On A Delete Statement

Re: I Need Help On A Delete Statement

From: EnderW <ender29_at_my-deja.com>
Date: Fri, 27 Oct 2000 03:32:30 GMT
Message-ID: <8tat0f$ndp$1@nnrp1.deja.com>

delete from address_1
where rowid in (
select min(rowid) from address_1 a
where
a.field_1 in (select b.field_1 from address_2 b

                             and substr(a.field_2,1,10) =
substr(b.field_2,1,10))
)
;

huh i don't know if this is correct I don't know your table layout nor column dependencies

In article <39F8DC18.FFCF1186_at_linkline.com>,   Socalman <socalman_at_linkline.com> wrote:
> Sorry to intrude, but I must be brain dead because I have done
 something
> like this in the past. I have two tables in Oracle that are
 identical,
> tables "ADDRESS_1" & "ADDRESS_2". I want to delete any duplicate
> addresses that are on ADDRESS_1 that may be on ADDRESS_2. So, I
 thought
> my syntax would be something like this:
>
> delete from address_1 a
> where a.field_1 = (select b.field_1 from address_2 b
> and substr(a.field_2,1,10) =
> substr(b.field_2,1,10));
>
> Please help if you can. I know it's a simple problem, but I'm running
> on empty!
>
> Thanks, email: socalman_at_linkline.com
>
>

--
Ender Wiggin


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Oct 26 2000 - 22:32:30 CDT

Original text of this message

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