Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to append information to simmilar data
LKBrwn_DBA <member30625_at_dbforums.com> wrote in message news:<3219487.1060379433_at_dbforums.com>...
> Try this:
>
> select stu_fnm1||'.'||stu_surn||rk username, field2,field3 from (
> select stu_fnm1, stu_surn, field2, field3 ect...
> , rank() over (partition by stu_fnm1, stu_surn
> order by stu_fnm1, stu_surn) rk
> from table1
> where (stu_fnm1||'.'||stu_surn) in (select (stu_fnm1||'.'||stu_surn)
> from table1
> GROUP BY stu_fnm1||'.'||stu_surn
> HAVING Count(stu_fnm1||'.'||stu_surn)>1))
> order by username
Thanks it doesnt work exactly(it just adds 1 after every record) but it has pointed me in the right direction
Derek Received on Mon Aug 11 2003 - 03:06:01 CDT