How to pass data into EXECUTE_IMMEDIATE statement in plsql
body ?

Answers were Sorted based on User's Feedback



How to pass data into EXECUTE_IMMEDIATE statement in plsql body ?..

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

How to pass data into EXECUTE_IMMEDIATE statement in plsql body ?..

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

Post New Answer

More Oracle Apps Technical Interview Questions

where we find the status of order information.

2 Answers  


how can we return morethan one parameters in procedure?

2 Answers  


how to create a file in forms?

3 Answers   Wipro,


Need Training & Internship with guaranteed Job in ERP - Oracle Apps Tech?

4 Answers   Zensar,


What are the files we submit while your program move to testing instance?

4 Answers   Cap Gemini,






Where we can write a PL/SQL code in report triggers?

2 Answers   IBM,


Can u define exceptions twice in same block?

3 Answers  


What is procedure?

3 Answers   IBM,


What are Mandatory triggers to write in the block, which is created on view?

5 Answers   Oracle,


why r u move in the cus_top only why not move another top

4 Answers   Wipro,


Is that Possible To create package without Specification , If Yes Give any Examples

2 Answers   PWC,


what is difference between po_headers_all and po_headers

2 Answers   NTT Data,


Categories
  • Oracle Apps Technical Interview Questions Oracle Apps Technical (547)
  • Oracle Apps Financial Interview Questions Oracle Apps Financial (793)
  • Oracle Apps Manufacturing Interview Questions Oracle Apps Manufacturing (53)
  • Oracle Apps HRMS Interview Questions Oracle Apps HRMS (169)
  • Oracle Apps CRM Interview Questions Oracle Apps CRM (9)
  • Oracle Apps SCM Interview Questions Oracle Apps SCM (141)
  • Oracle Install Base Interview Questions Oracle Install Base (62)
  • Oracle Service Contracts Interview Questions Oracle Service Contracts (101)
  • Oracle Apps AllOther Interview Questions Oracle Apps AllOther (114)