hi gayatri,
you may give an outer  loop with an appropriate terminating condition. when
the null value appears give exit command to come out of the inner loop. the
end of the outer loop will take you back again  to the inner loop giving you
the desired loop effect.
first thing you check again is for null value then assign user1.

regards
Gopa

On Jan 24, 2011 12:34 AM, "gayathri Dev" <gd0...@gmail.com> wrote:

hope this can give a lil more picture of what I am doing.

I am using Index_by_table (tab_user) of type struct_tab_user

for i in tab_user.first.. tab_user.last loop
      if treat(tab_user(i) as struct_tab_user).user_id = 'user5' then
        next_user_id := tab_user.next(i);     *-- returns NULL, but I want
to loop back and say the next_user is user1*
        next_user := treat(tab_user(next_user_id) as
struct_tab_user).user_id ;
      end if;
end loop;

user1, 1 <- Next user


user2, 2
user3, 3
user4, 4,
user5, 5. <- input parameter.






On Sun, Jan 23, 2011 at 10:46 AM, gayathri Dev <gd0...@gmail.com> wrote:
>
> Hi All,
>
> Is the...

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to