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 |
In which directory your flatfile is given?if u connected different instance where it is find?
In a table their 20 records.I had update 6 records???How can see and retrieve particular 6 records.i.e.,Latest updated.
10 Answers HCL, TCS,
what is meant by bind parameter?
what is the defference between credit memo and debit memo
what is meant by boilerplates?
PL/SQL stored procedure parameters?
Oracle E-Business suite?
How to report output like below supplier name date amount abc software jan/11 10000 /* jan month total transactions*/ abc software feb/12 30000 /* feb month total transactions*/ dell computers jan/13 45000 /* jan month total transactions*/
Do you know where we can check the status of po?
Can you define an erp system?
Explain the multi-organization structure.
types of invoices?
7 Answers BelAir Store, Convergys, Wings Biotech,