Re: Deleting with goup

From: Giorgos Tsiamitas <gtsiam_at_gmx.net>
Date: Sat, 21 Jul 2001 21:10:20 GMT
Message-ID: <WzoT6.133$3t.5248_at_nreader1.kpnqwest.net>


delete from tabX
where colX in (

    select colX
    from tabX
    group by colX
    having count(*) > 1
);

--
Giorgos

"Michal" <michalp_at_cr-media.com.pl> wrote in message
news:3b1e0c6b_at_news.vogel.pl...

> I need to delete some data from table
> but I must use HAVING COUNT(*)=x
> in the condition of delete. The delete syntax
> of course do not allow such one so I've tried to
> create view (with group by clause)
> and delete data from it
> but oracle says that this I cannot modify
> data within it. Any other views created on
> the same set of tables are of course udateable.
>
> Is there any other way to delete it?
>
> Thanks in advance
> --
> Michal
>
>
Received on Sat Jul 21 2001 - 23:10:20 CEST

Original text of this message