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: HELP!

Re: HELP!

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Mon, 30 Aug 1999 11:11:09 +0200
Message-ID: <7qdhsm$n32$1@oceanite.cybercable.fr>


Try:

SQL>select * from t;

COL



A1093459
A109345
B2062768
B206276

4 rows selected.

SQL> delete from t a where exists
 2 (select null from t b where length(a.col)=7 and b.col like a.col||'_');

2 rows deleted.

SQL>select * from t;

COL



A1093459
B2062768

2 rows selected.

Michael a écrit dans le message
>I am trying to select the first seven char of 8 characters column
>within a large table & then compare this with existing seven char columns.
>If there is a match then I need to delete the seven chars.
>
>eg.
>
>Table X
>
>House_ no
>A1093459
>A109345 >needs to be deleted
>B2062768
>B206276 >needs to be deleted
>
>
>I have tried
>
>DELETE FROM (SELECT * FROM X
>WHERE HERD_NO LIKE SUBSTR(HOUSE_NO,1,7)||'_')
>
>but this deletes 8 characters
>
>
>
>
>
>
Received on Mon Aug 30 1999 - 04:11:09 CDT

Original text of this message

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