Replaced use of CURSORs with single step selects
Changed the SQL statements used to retrieve data to be simple selects rather than declared as cursors. This allows the selects to be executed with a single statemen execution, eliminating the need for BEGIN and END blocks. Other minor clean up.
Showing with 138 additions and 197 deletions