Using SQL Cast that works on both Oracle and Postgres