I have the following issue with some data in a table
TRANS_TIME = HHMMSS (Example 10:00AM = 100000)
We have the command below to convert the time because we have sometimes in TRANS_TIME a value of 09:00AM, which is stored as 90000. So we use the statement below :-
CASE WHEN TRANS_TIME >= 100000 THEN CAST(TRANS_TIME AS char(6)) ELSE '0'+ CAST(KAS_ZEIT AS char(5)) END
Problem is we have TRAN_TIME values of 300 for (00:03:00) for example causing issue and wanted to to know the best way to deal will all interpretations of TRANS_TIME up until the last second (00:00:01) which is stored in TRANS_TIME as 1.