Re: parsing column info - Mailing list pgsql-general

From Jeff Eckermann
Subject Re: parsing column info
Date
Msg-id 20020910215530.12437.qmail@web20805.mail.yahoo.com
Whole thread Raw
In response to parsing column info  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
--- "Johnson, Shaunn" <SJohnson6@bcbsm.com> wrote:
> I no longer want the decimals in that column.  Is
> there
> a way to parse out the decimals when copying this
> into
> a new table?

Assuming that this column is a varchar(50) like the
others, and that all you want is to delete the decimal
points, probably the easiest way is to use the
"translate" builtin function:
SELECT translate(field,'.', '') (I think: check the
syntax under "string functions" in the docs).

__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

pgsql-general by date:

Previous
From: snpe
Date:
Subject: Re: describe table query?
Next
From: Alvaro Herrera
Date:
Subject: Re: Psql regex is NFA or DFA?