Solved

how to set the pass the parameter for %rowtype

Posted on 2011-03-01
2
805 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
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle -- identify blocking session 24 43
PAYER_ID has both atributes 4 32
Best RAID for a BDD Oracle 4 62
Distinct values from all columns in a table?? PL SQL 4 25
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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…

867 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

20 Experts available now in Live!

Get 1:1 Help Now