Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL Variable Declarations (ORACLE 9i)
PL/SQL Variable Declarations [message #304600] Wed, 05 March 2008 15:55 Go to next message
manningda
Messages: 31
Registered: January 2008
Member
Reviewing an existing db and PL/SQL Web App.

Within is the folliwing Cursor


cursor c1(aRowid in varchar2) is
      select *
      from sample s
      where rowid = aRowid;
   c1_rec c1%rowType;




Im afraid my inexpereince is showing through and I am struggling to understand how the variable [aRowid] is being filled.

I think that I understand that on Line1, Cursor "c1" is delcared and is being passed the variable [aRowid].

But I am sill unclear as to how this variable is recieving a value.

The query is based on the condition that

rowid = aRowid;


...but when I search foward and backward within the package body, I see no other place where the variable "aRowid" is dealt with, filled or otherwise given a value.

Using PL/SQL Developer, I have gone so far as to search all package bodies for the variable aRowid, but to this point am still not seeing the association that would present a value that would allow the query to complete.

I do realize that this a bit vauge as a question, and may apply to programming basics that I need to build more skill with, but how would one suggest determining the value that "aRowid" is being filled with so to more accurately review the query results?

Hoping I was able to define my question clearly.

Thanks in advance for all input / advice.
Re: PL/SQL Variable Declarations [message #304601 is a reply to message #304600] Wed, 05 March 2008 16:01 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
search in the package where the cursor is opened. Hopefully you will find an answer by yourself. Also take some time read the oracle pl/sql reference manual.

Regards

Raj
Re: PL/SQL Variable Declarations [message #304607 is a reply to message #304600] Wed, 05 March 2008 16:31 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8625
Registered: November 2002
Location: California, USA
Senior Member
Arowid is just the parameter name for that cursor. Somewhere in the code you should see something like:

OPEN c1 (some value here);

Whatever value is there becomes the value of aRowid.
Re: PL/SQL Variable Declarations [message #305730 is a reply to message #304607] Tue, 11 March 2008 14:26 Go to previous message
manningda
Messages: 31
Registered: January 2008
Member
Deep Thanks to both Barbara Boehmer & S.Rajaram!!!

Ive been reviewing the point where the cursor is opened and feel like I am understanding much more, but there are sooo many passed variables in this app Im afraid Im still feeling my inexpereince as I work to disect much of the logic.
Embarassed

Im sticking with it though with your help am making headway!!

Thanks again! Sorry I did not come back to this post sooner.
Embarassed
Previous Topic: Group by Error
Next Topic: Loading time dimension table
Goto Forum:
  


Current Time: Sat Dec 03 15:57:54 CST 2016

Total time taken to generate the page: 0.03870 seconds