| From: | Doug McNaught <doug(at)mcnaught(dot)org> |
|---|---|
| To: | Tad Marko <tad(at)tadland(dot)net> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Data conversion in query |
| Date: | 2003-03-27 19:56:14 |
| Message-ID: | m3ptocy469.fsf@varsoon.wireboard.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Tad Marko <tad(at)tadland(dot)net> writes:
> Hello,
>
> I'm having a small difficulty that I am hopeful there is a simple solution
> for. Basically, I am doing a join on a column that is numeric in one
> database but a string in the other. Something like:
>
> ...WHERE a.numeric_zipcode=b.string_zipcode::integer...
>
> The problem is that occasionally the string zip field has some
> non-numeric characters. Unfortunatley, I cannot control the sanity of the
> string zip field. The question is if there is any way that in the same
> query I can filter out the rows that have non-number characters in the zip
> field?
You should be able to use regular expressions for this.
-Doug
| From | Date | Subject | |
|---|---|---|---|
| Next Message | philo vivero | 2003-03-27 20:05:08 | Re: PostgreSQL + IDS load/latency help |
| Previous Message | Tad Marko | 2003-03-27 19:43:10 | Data conversion in query |