Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Convert complex delete sql statement to Oracle?
Depending on how your keys are set up, you might be able to do
something like:
DELETE from(select A.*
FROM TABLE1 A, TABLE2 B, TABLE3 C
WHERE A.MYKEY= B.MYKEY AND A.UNIQUEKEY = B.UNIQUEKEY
AND B.MYKEY= C.MYKEY AND C.KEY1 NOT BETWEEN 'A' AND 'Z');
This is essentially a delete through a view and there are restrictions on what you can do this way. For testing you could add "and rownum=1" to quickly see if this will work for you.
Gene Hubert
Durham, NC
"Brad Pybus" <brad_pybus7zwq_at_hotmail.com> wrote in message news:<b1y89.1237$Bd4.10300_at_dfw-service2.ext.raytheon.com>...
> I can do this statement in SQL Server but I can not figure out how to do it
> in Oracle. I just want it to delete records in Table1.
>
>
> DELETE A
> FROM TABLE1 A, TABLE2 B, TABLE3 C
> WHERE A.MYKEY= B.MYKEY AND A.UNIQUEKEY = B.UNIQUEKEY
> AND B.MYKEY= C.MYKEY
> AND C.KEY1 NOT BETWEEN 'A' AND 'Z';
Received on Wed Aug 21 2002 - 10:56:31 CDT
![]() |
![]() |