Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie PL/SQL question
Hi,
a better way would be using the following SQL-Statement:
select ID from sample s1 where
s1.dnumber, s1.year, s1.num, s1.dte in
(select s2.dnumber, s2.year, s2.num, s2.dte
from sample s2
having count(*) > 1
group by
s2.dnumber, s2.year, s2.num, s2.dte)
Hope that helps,
bye
Uli
>
> My current program (has errors) looks like this:
>
> SET serveroutput on;
> DECLARE
> CURSOR sample_curs IS
> select DNUMBER, YEAR, NUM, DTE from SAMPLE;
> row_var sample_curs%ROWTYPE;
> count_var number(2);
> id_var SAMPLE.ID%TYPE;
> What's the best way to output the IDs of the rows with dup columns?
Received on Wed Oct 06 1999 - 00:00:00 CDT
![]() |
![]() |