Prueba asi:
Código SQL:
Ver originalSELECT DISTINCT HORAS_TRAB, TERMINAL, FECHA,
CASE WHEN ISNUMERIC(HORAS_TRAB) = 0 THEN 0 ELSE CAST(HORAS_TRAB AS NUMERIC(6,4)) - 0.3125 END AS Q_HORAS_EXTRAS
FROM horas_oc
WHERE horas_extras = 'si' AND TIPO_CONDUCTOR = 'FULL'