Вместо CAST('' AS DOUBLE PRECISION) пишу
CAST(NULLIF(FIELD, '') AS DOUBLE PRECISION)

Ответить