Whenever the process runs, I want to get a record from a table. The process will take an input of a number, say, employee_number and it will return a complete record - which will include, say, employee_name, company, date of joining etc. I usually do not work with processes. I am in analytic SQL
To create or change process getdetails (search_strin table_name.column_1% type, p_recordset out sys_refcursor), select Open p_recordset for table_name from column 2, column_3 where Column_1 = search_str; Finally getdetails;
This should work, is not it? But, I'm getting the following error!
PLS-00306: 'GET_EMP_RS' contains incorrect numbers or types of arguments in the call
Assume that the name of your table is EMPLOYEE to do whatever you are asking if you will do something like the following:
Build or re-implement GET_EMPLOYEE_RECORD (Number of Employee Number) Return Employee% ROWTYPE Row Employee Employee Employee% ROWTYPE; Select from beginning e Employee employee and EFOFEEEEEEEEEE = NEPPF_Number; Return line employee employee; END GET_EMPLOYEE_RECORD;
Hope this will get you started.
Share and Enjoy
Edit
If you need to use processes and not a function, then you have to use an output parameter to return your data; In this way, you can do something like:
Create or process process GEFLOEEEEEECDR (Pin_Emory_Number Number starts job pay-start employee employment) starts. By email and EFOOoOoAMA in pout_Employee_row = pin_impere_number; END GET_EMPLOYEE_RECORD;
Then you will be seeing the process from code as follows:
DECLARE nEmployee_number NUMBER; ROW EMPLOYEES EMPLOYEE% ROWTYPE; BEGIN nEmployee_number: = 123; - or the price you prefer GET_EMPLOYEE_RECORD (pin_Employee_number = & gt; nEmployee_number, pout_Employee_row = & gt; line employees); - Now employees in the row with some staff staff ... END;
share and enjoy.
No comments:
Post a Comment