Cast Problem - Mailing list pgsql-novice

From
Subject Cast Problem
Date
Msg-id 20050811185002.4043.qmail@web33303.mail.mud.yahoo.com
Whole thread Raw
In response to Re: loading data for newb  (tgoodaire@linux.ca (Tim Goodaire))
Responses Re: Cast Problem
List pgsql-novice
i do a sort by serial number.  in order to sort the
way i want, i need to cast serial_number (type text)
as an integer.

... ORDER By serial_number::integer ASC;

this works great in pgsql 7.4.x (whatever i'm using on
my dev box, i think 7.4.3, but not sure), but it
doesn't work in pgsql 7.3.9.

it doesn't allow the query to complete and i
eventually get a "non object" error.

is there someting equivalent to the above line that
will work in 7.3.9?

i know, these are old versions of pgsql.  we are going
to bring the db in house and i will start working the
latest and greatest pgsql and php shortly.  until
then, though, i'd like to display my serial numbers in
a manner that looks nice to the user (iow, "10" won't
come before "2").

as always, tia.



__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


pgsql-novice by date:

Previous
From: "Walker, Jed S"
Date:
Subject: Re: Forcing WAL switch
Next
From: Michael Fuhr
Date:
Subject: Re: Cast Problem