0

I have take a field as 'filename Pro_180913_171842' from spectrum. Tried the function in sql like

       `select
       fields
      from spectrum.ex
      where cast(SPLIT_PART('filename Pro_180913_171842','Pro_',2)as 
      timestamp)>cast('2018-09-12 15:13:54.0' as timestamp)`

but it returned empty rows only!

1 Answers1

0

Your field has no date component, so unless we add date information, it makes no sense to compare to a full timestamp. If you intend to compare only times, then try this:

SELECT fields
FROM spectrum.ex
WHERE SPLIT_PART('filename Pro_180913_171842', '_', 2) > '151354';
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360