On Sun, Mar 14, 2004 at 04:59:45PM -0600, Mike Nolan wrote:
> > 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:
test=# select to_number('abc 1', '"abc "99');
to_number
-----------
1
(1 row)
test=# select to_number('abc 20', '"abc "99');
to_number
-----------
20
(1 row)
Karel
--
Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/