varchar => int

From: "Mitch Vincent" <mitch(at)venux(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: varchar => int
Date: 2001-01-27 23:04:51
Message-ID: 01b101c088b5$8dfb7920$0200000a@windows
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well, here I am trying to do a range search on a varchar field (though it
has numbers in it...)..

I can't cast varchar to int (according to the error I'm getting..), any
ideas on how I can accomplish a ranged search on a varchar field (taking
into acount the value of the numbers, not the character's ascii code)?

I know. It's a messed up thing to do.. I didn't design these tables, I think
it's like that so the zip codes (what's stored in this table) could contain
dashes... Now they want to search it with a range.... *sigh*..

Thanks for any ideas..

-Mitch

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin Leja 2001-01-27 23:13:06 someone please explain this regex behaviour
Previous Message Frank Joerdens 2001-01-27 22:48:46 Setting logfile location with pg_ctl and postgres.conf