How to pass data into EXECUTE_IMMEDIATE statement in plsql
body ?
Answers were Sorted based on User's Feedback
Answer / eldho
Hope this pice of code explains:
declare
v_query VARCHAR2 (200);
v_employee_name VARCHAR2 (50);
BEGIN
v_query := 'SELECT emp_name from employees where emp_id =
102';
EXECUTE IMMEDIATE v_query
INTO v_employee_name;
DBMS_OUTPUT.put_line ('Emp Name is ' || v_employee_name);
END;
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / m.n
declare
v_query VARCHAR2 (200);
v_inv_item_id VARCHAR2 (50);
BEGIN
v_query := 'SELECT inventory_item_id from
mtl_onhand_quantities_detail where inventory_item_id =107';
EXECUTE IMMEDIATE v_query
INTO v_inv_item_id;
DBMS_OUTPUT.put_line ('inventory_item_id ' ||
v_inv_item_id);
exception
when others then
DBMS_OUTPUT.put_line ('inventory_item_id ' ||
v_inv_item_id);
END;
| Is This Answer Correct ? | 4 Yes | 2 No |
what is the use of placeholer column?
what is aim methodolozy
List of all the modules under Manufacturing, Finance and Distribution in oracle applications?
What are do's and dont's of Interface?
how many layout sections are tehre in layout editor?
Pls tel me the best text book for Oracle Apps 11i Tech? & I want D2K Text book also?
What do you understand by concurrent programs?
how to get the on hand quantity of an item across all organizations? name the underlying tables.
2 Answers Ranves IT Solutions, Scan Steel,
what are the prerequisites for costing transactions?
how to debug the report?
2 Answers IBM, Qualcomm, Sierra Atlantica,
In SQL Loader i have 100 Records to be loaded into my table. How do i load the first 30 Records and skip the last 10 Records within a single .ctl file ? So my total no.of records to be loaded would be 60. Could anybody help me in this ?
If we have a repeated record in a table. But the repeated record how i can transfer from table to nested table?