Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL problem
You could just do something like this:
SELECT
ag_num, count(ag_num)
FROM
(table_name)
HAVING
count(ag_num)>1
GROUP BY
ag_num
In article <35e6cb91.185646196_at_news.u-net.com>,
russ_at_u-net.net (Russell Fray) wrote:
>
> Hi there,
>
> Just a quick question for the SQL gurus, as I can't seem to suss this
> one :)
>
> I have a table which contains lots of numbers in a field called
> 'ag_num'. Within this field, some numbers are duplicated. I want to
> list the duplications so i can delete them at my discretion, before
> copying all data from this table in to a new table that does not allow
> duplicated in that field.
>
> In pseudo code :
>
> select * from (table.name) where the same ag_num is repeated more than
> once
>
> Please cc replies to russ_at_u-net.net
>
> Thanks!
> Russ.
>
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Aug 28 1998 - 15:34:07 CDT