Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to set the pass the parameter for %rowtype

Posted on 2011-03-01
2
Medium Priority
?
834 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 1600 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 400 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

618 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