If you need to treat empty columns as NULL
s, try this:
SELECT CAST(nullif(<column>, '') AS integer);
On the other hand, if you do have NULL
values that you need to avoid, try:
SELECT CAST(coalesce(<column>, '0') AS integer);
I do agree, error message would help a lot.