Sam,
> Maybe something like:
>
> SELECT MAX(nullif(regexp_replace(test, '^([0-9]*).*$', E'\\1'),'')::INT);
Thank you.
This seems to work but is bit slow.
How to speed it up ?
Should I create index
CREATE INDEX test ON test ( nullif(regexp_replace(test, '^([0-9]*).*$',
E'\\1'),'')::INT );
?
Andrus.