set term ^;

create or alter procedure CHECK_SP2_DB_VERSION
AS
begin
  if (not exists (select si.INFO_VALUE
                  from   SYSTEM_INFO_GET ('PATCH_VERSION') si
                  where  cast(si.INFO_VALUE as integer) >= 42)) then
    exception WRONG_VALUE 'Incorrect Database version! Minimum required version - 42.';
end
^
set term ;^


execute procedure check_sp2_db_version
;

drop procedure check_sp2_db_version
;
