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 and Who is the best Institute or Trainer for Oracle Apps Technical ?
How can you achieve loose coupling in soa framework?
What are Mandatory triggers to write in the block, which is created on view?
List the various types of value set.
how can u find the status in po?
how to print multi lay outs,muti currency,muti language in xml publisher
diff between key and descriptive flexfield.
how can u link a org-id with a responsibility in reports?
tell me the scenarios of between pages in reports
in sql loader,i have 100 records in my flatefile, i want to skip the 80 to 90 records .please help me
What is the result of this query ? SELECT * FROM EMP WHERE ROWNUM = 1
After deploying like forms,reports into server how we connect this forms,reports to web?