varchar => int - Mailing list pgsql-general

From Mitch Vincent
Subject varchar => int
Date
Msg-id 01b101c088b5$8dfb7920$0200000a@windows
Whole thread Raw
Responses Re: varchar => int
List 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


pgsql-general by date:

Previous
From: Frank Joerdens
Date:
Subject: Setting logfile location with pg_ctl and postgres.conf
Next
From: Martin Leja
Date:
Subject: someone please explain this regex behaviour