I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any docs is appreciated...)
All of the docs I've looked only mention declaration and assignment not valid placement.
When I use an input parameter to a cursor placement matters . I just don't understand why...
example... using the value "SCOTT" as an input parm to the c10 cursor replaces the "str_in" variable correctly and works...
1 declare
2 cursor c10(str_in IN varchar2) is
3 select username
4 from dba_users where username=str_in ;
5 begin
6 for r_c10 in c10('SCOTT') loop
7 dbms_output.put_line(r_c10.username);
8 end loop;
9* end;
SQL> /
SCOTT
PL/SQL procedure successfully completed.
However, when trying to replace another "word" it won't resolve the reference...
example... attempting to replace the from table_name as an input parm, no go...
1 declare
2 cursor c10(str_in IN varchar2) is
3 select username
4 from str_in where username='SCOTT' ;
5 begin
6 for r_c10 in c10('DBA_USERS') loop
7 dbms_output.put_line(r_c10.username);
8 end loop;
9* end;
SQL> /
from str_in where username='SCOTT' ;
*
ERROR at line 4:
ORA-06550: line 4, column 6:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 3, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 7, column 26:
PLS-00364: loop index variable 'R_C10' use is invalid
ORA-06550: line 7, column 5:
PL/SQL: Statement ignored
Why can't it resolve the string ?
Any help is appreciated
dumb newbie...
How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.I am working on a application which uses HTTP connection, but the problem here is that the response from server is late... I want to create
if php cookie set, show code...
Hi all.. I need to figure out this little snippet right quick.. seems like it should be easy enough to do, but I'm flailing here...I need to have a blurb that checks to see if a cookie of a specific
WM transfer order: confirm different batch than proposed by system
Hi folks,
Combining refCursors and Summing
Given the following DDL:
SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is significal for e.g Plan cost is 112 million where as budget is 136 million. In this situation what will
I am stumped
OK. Here is what I am trying to do. I have the conditions set, and if the conditions are met, I want to randomly find a user id, and username from a table, and then store each of these names in the
Beginners syntax and loop questions - help please!
Hi everyone,I have some problems with php code. I'm currently in the middle of learning php, but these problems have got me stuck fast. But also have a question regarding looping that i'll ask in the
Undefined offset
The following script checks to see if the user answer matches the correct answer. Form Fields are set up the following way...user_answer[$i] | value = auser_answer[$i] | value = buser_answer[$i] |
query help
Hi experts.
Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to put the CRON code do I put it in the header between the head tags? do I put it before any html code?