On Nov 22, 2007 11:24 AM, Franklin Haut <franklin(dot)haut(at)gmail(dot)com> wrote:
> num return
> ---- ------
> 0 0
> null false
> 12 12
> a false
> 12ab false
>
> it´s possible get these results ?
Try:
SELECT
NUM
, CASE
WHEN TRIM(NUM) ~ '^[0-9]+(.[0-9]+){0,1}$'
THEN NUM
ELSE 'false'
END AS RETURN
FROM TEST;