Need help combining two scripts
"ERROR at line 3:
ORA-06550: line 3, column 1:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior
The symbol "begin" was substituted for "SELECT" to continue.
ORA-06550: line 43, column 81:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
, * & - + / at mod remainder rem <an identifier>