Re: [despammed] converting varchar to integer

From: "A(dot) Kretschmer" <akretschmer(at)despammed(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: [despammed] converting varchar to integer
Date: 2005-08-17 17:40:24
Message-ID: 20050817174024.GA26603@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

am 17.08.2005, um 12:46:01 -0400 mailte Frank Bax folgendes:
> >> 1) check the value in it is an integer
> >> 2) get the integer value (as integer)
> >test=# update foo set n = substring(t , '[0-9]')::int;
>
>
> I think you meant:
> update foo set n = substring(t , '[0-9]+')::int;

Yes, of corse. Thank you.

Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-08-17 17:43:55 Re: Is it This Join Condition Do-Able?
Previous Message Dmitri Bichko 2005-08-17 17:25:53 Re: Is it This Join Condition Do-Able?