Solved

how to set the pass the parameter for %rowtype

Posted on 2011-03-01
2
812 Views
Last Modified: 2012-05-11
Please find the structure of Storeprocedure. The  emp_in   is taking parameter of emp%rowtype ;  emp being table in the database.
Now  when I need to execute blow sp, I need set the value for    emp_in      and pass as param.  how to set the value and execute the sp.
procedure emp_store(
        emp_in          emp%rowtype,
        inserted_ind_out            out pkg_util.TYPE_FLAG,
        emp_id_out      out emp_id%type
        );
0
Comment
Question by:chaitu chaitu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 400 total points
ID: 35005994
first fetch that into a variable and then pass it accordingly as shown below :

declare
myrec_var emp%rowtype;
begin

select * into myrec_var from emp where empno = 100;

emp_store(myrec_var,.... );

end;
/
0
 
LVL 1

Assisted Solution

by:sunil_rangineni
sunil_rangineni earned 100 total points
ID: 35015951
What nav_kum_v said is correct. For a single record, you can use %rowtype. But if you wanna process multiple reocords or huge set of data, you need to use collections. Refer the below documentation for more details.
http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
exp/imp 25 100
PL SQL Search Across Columns 4 62
sum of columns in a row in oracle 3 42
setting local variables in a cursor block 3 29
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question