Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

filling the gaps

770280Jul 16 2010 — edited Jul 16 2010
Hi Gurus!

I have a table ff, that has 2 columns id_1 and id_2.
with ff as
(
select 1 id_1, 1    id_2 from dual union all
select 2 id_1, null id_2 from dual union all
select 3 id_1, null id_2 from dual union all
select 4 id_1, 2    id_2 from dual union all
select 5 id_1, 3    id_2 from dual union all
select 6 id_1, null id_2 from dual union all
select 7 id_1, 4    id_2 from dual 

)select * from ff

ID_1	ID_2
------------
1	1
2	
3	
4	2
5	3
6	
7	4
Desired output:
ID_1	ID_2
------------
1	1
2	1
3	1
4	2
5	3
6	3
7	4
Hope this makes sense

Thanks
This post has been answered by Aketi Jyuuzou on Jul 16 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2010
Added on Jul 16 2010
5 comments
951 views