title: Oracle - two loops in procedure
body: <p>I need some help in writing Oracle PL/SQL procedure that should do the following:</p>
  
  <ol>
  <li><p>the procedure is called from a trigger after an update of the field in one table with the input parameter B-block or D-activate (this is already done)</p></li>
  <li><p>the procedure should first open one cursor that will catch the account numbers of a client and open a loop that will process account by account</p></li>
  <li><p>this one account should be forwarded to another loop that will catch card numbers of that client for that account (second cursor) and when into this loop, the card number should be used as an input parameter for a stored procedure that is called to block/unblock this card - this stored procedure already exists I just need to call it</p></li>
  <li><p>the procedure don't need to return any parameters, the idea is just to block/activate card number of a client with the already written stored procedure for that</p></li>
  </ol>
  
  <p>Should I write a package for this or just a procedure? And how can I write one loop in another?</p>