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 |
List the various types of value set.
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 error tables in AP?
What is Formula Column?
what are version control tools used in oracle apps?
how can we return morethan one parameters in procedure?
What is the Lookup's and what is the use of lookup's?
Matrix Report: Simple, Group above, Nested
Tell me where we find the status of order information?
differentiate between intra & inter UOM class conversion with examples.
What is GLOBAL TEMPORARY TABLE and It's significance ?
Difference between set of books id and ledger id in r12 ?