> CSN wrote:
> > Is it possible to have items sorted like:
> >
> > abc 1
> > abc 2
> > abc 10
> > abc 20
>
> Cast them to a numeric type.
You can't cast a variable char type to a numeric, though apparently
you can cast text to numeric. (I'd be curious to know why one but not
the other.)
However, if I understood the original question, 'abc 1' and 'abc 20' are
contents of a single column, which might make separating out just the
numeric part tricky.
On a somewhat related subject, how difficult would it be to write an
'isnumeric' function as part of the source code as opposed to a user
function in pgsql or perl?
I have some data that is mostly numeric but not always so. I know from
other columns whether a particular row is supposed to contain a numeric
value or not, but the data is coming from a legacy environment
and isn't 100% reliable.
An 'isnumeric(column)' boolean function in a case statment would be
very helpful so that I can program around the bad data.
I'll probably write it in perl, but would making it part of the source
code provide significantly faster execution?
--
Mike Nolan