Re: Change a character in a text field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> Naomi Walker <nwalker@xxxxxxxxxxxxxxx> wrote: 
> Is there some way with a SQL state to interrogate a text field, and 
> replace characters.
> 
> For example, we would like all "|"'s to be changed to something else,
on 
> a regular basis...
 
It sounds like you might want to look at the regexp_replace function:
 
http://www.postgresql.org/docs/8.3/interactive/functions-matching.html#FUNCTIONS-POSIX-REGEXP
 
Be sure to use a WHERE clause on your UPDATE with the ~ operator.
 
-Kevin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux