numtodsinterval 함수를 쓰면 어떨까요?
SELECT TO_CHAR( TIMESTAMP'2020-12-31 00:00:00' + NUMTODSINTERVAL(250000, 'SECOND'), 'HH24:MI:SS') FROM DUAL;
https://stackoverflow.com/questions/51083401/ora-01830-failure-at-to-date-function-if-the-field-contains-more-than-5-digits
https://stackoverflow.com/questions/970249/format-interval-with-to-char
sssss 는 하루에 해당하는 초까지만 가능합니다. (24*60*60 = 86400, 0 ~ 86399 초)
24시간이 넘어가는 일수에 해당하는 부분을 따로 뽑아야죠.
WITH t AS ( SELECT 86399 s FROM dual UNION ALL SELECT 86400 FROM dual UNION ALL SELECT 86401 FROM dual ) SELECT s , FLOOR(s / (24*60*60)) days , TO_CHAR(TO_DATE(MOD(s, 24*60*60), 'sssss'), 'hh24:mi:ss') times FROM t ;