From: Kaloyan Iliev <news1@faith.digsys.bg>
To: Judith <jaltamirano@correolux.com.mx>
To: pgsql-sql@postgresql.org
Subject: Re: Substitute a Character
Date: Thu, 07 Sep 2006 12:03:24 +0300
Message-ID: <44FFE05C.2010109@faith.digsys.bg> (raw)
In-Reply-To: <44FEFCFA.8010501@correolux.com.mx>
References: <44FEFCFA.8010501@correolux.com.mx>
Hi,
Try:
UPDATE foe SET field = regexp_replace(field, '^.', '0');
OR
UPDATE foe SET field = regexp_replace(field, 'A', '0');
This will replace in table "foe" in the column "field" 'A' with '0';
Regards,
Kaloyan Iliev
Judith wrote:
> Hello everybody!! I have a field type text with folios like
> this: A98526
>
> but I want to change de A for a 0 like this: 098526, exists a way
> to do this in a query???
>
> Thanks in advanced!!!
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: news1@faith.digsys.bg, jaltamirano@correolux.com.mx
Subject: Re: Substitute a Character
In-Reply-To: <44FFE05C.2010109@faith.digsys.bg>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox