Простая функция ЗАМЕНА, кажется, работает очень хорошо.
SQL> -- create an populate table
SQL> create table errmsg (msg_id number,
2 msg_txt varchar2(100)
3 )
4 ;
Table created.
SQL> insert into errmsg values (1,'ERROR - abc failed to load service request on {Date/Time} .The CIRCUIT is missing.');
1 row created.
SQL> insert into errmsg values (2,'ERROR - abc failed to load service request on {Date/Time}. The JOB_STREET_NAME is missing.');
1 row created.
SQL> insert into errmsg values (3,'ERROR - abc failed to load service request on {Date/Time}. The JOB_TOWN is missing.');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from errmsg;
MSG_ID
----------
MSG_TXT
--------------------------------------------------------------------------------
1
ERROR - abc failed to load service request on {Date/Time} .The CIRCUIT is missin
g.
ERROR - abc failed to load service request on {Date/Time} .The CIRCUIT is missin
g.
2
ERROR - abc failed to load service request on {Date/Time}. The JOB_STREET_NAME i
s missing.
3
ERROR - abc failed to load service request on {Date/Time}. The JOB_TOWN is missi
ng.
3 rows selected.
SQL> -- test the method
SQL> select replace(msg_txt,'{Date/Time}',to_char(sysdate,'dd-Mon-yyyy hh24:mi:ss')) logged_message
2 from errmsg
3 where msg_id=1;
LOGGED_MESSAGE
--------------------------------------------------------------------------------
ERROR - abc failed to load service request on 25-Mar-2020 16:16:39 .The CIRCUIT
is missing.
1 row selected.
SQL> --
SQL> select replace(msg_txt,'{Date/Time}',to_char(sysdate,'dd-Mon-yyyy hh24:mi:ss')) logged_message
2 from errmsg
3 where msg_id=2;
LOGGED_MESSAGE
--------------------------------------------------------------------------------
ERROR - abc failed to load service request on 25-Mar-2020 16:16:39. The JOB_STRE
ET_NAME is missing.
1 row selected.
SQL> --
SQL> select replace(msg_txt,'{Date/Time}',to_char(sysdate,'dd-Mon-yyyy hh24:mi:ss')) logged_message
2 from errmsg
3 where msg_id=3;
LOGGED_MESSAGE
--------------------------------------------------------------------------------
ERROR - abc failed to load service request on 25-Mar-2020 16:16:39. The JOB_TOWN
is missing.
1 row selected.
SQL> --
SQL> -- drop the table
SQL> drop table errmsg purge;
Table dropped.
SQL> spool off