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 multoorg and what is it's level or structure
WHAT IS REFCURSOR IN ORACLE ?
What is the Exception. Types of exception, Difference between those. And example
for report i have to parameters those are from_date and to_date ,so to_date should be greater when compare to from_date ,if we are giving to_date is less then it must shows some error how we willmake
Tell me how to debug the report?
If we have a repeated record in a table. But the repeated record how i can transfer from table to nested table?
In 11i we didn't have AP_Invoice_Lines Table, but in R12 this table is available, what is reason, advantage?
What is Pragma Autonomous transaction. It's Real time Example
How to call oracle database stored procedure from form in form coding ?
How to create a purchase order without a requisition?
what is the defference between credit memo and debit memo
How You Will display the key flexifields in your report