Posted By

wh0emPah on 04/01/10


Tagged


Versions (?)

jljl


 / Published in: PL/SQL
 

  1. CREATE OR REPLACE PROCEDURE P3_4_MINSTE_ORDERS AS
  2. CURSOR C_ORDERS IS
  3. SELECT LAST_NAME, FIRST_NAME
  4. FROM S_EMP
  5. WHERE ID = (
  6. SELECT SALES_REP_ID
  7. FROM S_ORD
  8. GROUP BY SALES_REP_ID
  9. FROM S_ORD
  10. GROUP BY SALES_REP_ID));
  11. R_ORDER C_ORDERS%ROWTYPE;
  12. OPEN C_ORDERS;
  13. FETCH C_ORDERS INTO R_ORDER;
  14. IF C_ORDERS%FOUND THEN
  15. DBMS_OUTPUT.PUT_LINE(R_ORDER.LAST_NAME || ' ' || R_ORDER.FIRST_NAME);
  16. END P3_4_MINSTE_ORDERS;

Report this snippet  

You need to login to post a comment.