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

In which directory your flatfile is given?if u connected different instance where it is find?

3 Answers  


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?

2 Answers   Satyam,


what is the defference between credit memo and debit memo

3 Answers   Wipro,


what is meant by boilerplates?

1 Answers  


PL/SQL stored procedure parameters?

7 Answers  


Oracle E-Business suite?

2 Answers  


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*/

4 Answers   Satyam,


Do you know where we can check the status of po?

0 Answers  


Can you define an erp system?

0 Answers  


Explain the multi-organization structure.

1 Answers   Accenture,


types of invoices?

7 Answers   BelAir Store, Convergys, Wings Biotech,


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)