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 |
Can function be overload?
Is soa a part of oracle fusion middleware?
How to develop XML report without rdf?
how do you describe O2C along with tables
Difference between triggers and procedures?
What are the tables in GL?
can we use look up type instead of a pofile option?or valueset?is it possible how?
What is SET-OF-BOOKS?
hi all.i am in need of some sample codes for oracle apps manufacturing interfaces.If any of u have,plz send it to me . Thank you.
what is the difference between request group and request security group in oracle apps?
INBOUND INTERFACE: Suppose I have 100 Records of employees in flat file.When moving the records from flat file to STAGING table using >CTl file, I want to restrict the records whose salary is less than 500.what are the validations(or conditions) you write to achieve this.
Do you know where we can check the status of po?