segunda-feira, 17 de abril de 2017

Oracle - INSTR (PATINDEX - SQL Server)


PATINDEX - INSTR
quarta-feira, 4 de janeiro de 2017
13:41
SELECT  HORA,
        TO_NUMBER(SUBSTR(HORA,1,INSTR(HORA,':')-1)) HORA,
        TO_NUMBER(SUBSTR(HORA,(INSTR(HORA,':')+1),2)) MINUTO,
        (TO_NUMBER(SUBSTR(HORA,1,INSTR(HORA,':')-1)) +
         TO_NUMBER(SUBSTR(HORA,(INSTR(HORA,':')+1),2))) AS VLRDECIMAL
FROM ZPFFINANC_IMP