goaway1234
Programmer
consider the following:
seems like pretty standard stuff, right? Except that the cursor in the inner loop is not returning any rows. However, when I execute the same query by substituting values for l_child.id and p_security_uid, i get numerous results. I am absolutely certain of what the values in these two variables are, and so I'm not using different values executing the query by itself. Can anyone help?
Code:
for l_child in (select *
from dropdown
where (p_category='Action' and
category='Reason' and
type=l_orig_contents)
or (p_category='Action' and
category='Comment' and
type2=l_orig_contents)
or (p_category='Reason' and
category='Comment' and
type=l_orig_contents))
loop
for l_child_orgs in (select dd.id
from dropdown dd,
dropdown_org org,
security_t
where org.show_Orgs=dd.contents
and dd.category='Orgs'
and org.dropdown_id=l_child.id
and security_t.grpname='Orgs'
and security_t.userid=Nvl(p_security_uid, 0)
and security_t.showname=dd.contents)
loop
...
seems like pretty standard stuff, right? Except that the cursor in the inner loop is not returning any rows. However, when I execute the same query by substituting values for l_child.id and p_security_uid, i get numerous results. I am absolutely certain of what the values in these two variables are, and so I'm not using different values executing the query by itself. Can anyone help?