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 aim methodolozy
Can u attach Request set with in the Request set?
How to call oracle database stored procedure from form in form coding ?
what is the difference between request group and request security in oracle apps?
In support project one ticket alloted which steps follows manualy tell me ?
tell my any difficult situtation you solved in your experience in your company?
We have to show a logo/image in a report? what are the steps and which format it is?whether in pdf format is applicable or not?
In xml report, how to print the headings in every page?
what is the database size you used?
What are profile options?
You are working with interfaces if client doesnot give any flat then what will u do?
wht r the basetables of customer interface?