Solved

how to set the pass the parameter for %rowtype

Posted on 2011-03-01
2
803 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
2 Comments
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 400 total points
Comment Utility
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
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

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…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now