Re: How do I add/edit 'digit' property into PGAdmin4 ?

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

 






Sent from Yahoo Mail for iPhone

On Saturday, July 20, 2019, 7:40 AM, Anthony E. Greene <agreene@xxxxxxxxx> wrote:

On 19-Jul-2019/11:46 +0000, Karen Goh <karenworld@xxxxxxxxx> wrote:
> Hi Shreeyansh,
>
>Due to many mails in my inbox, I got to see your email only now.
>
>I'd like to seek your help in terms of how to edit the data in this column that I want to change to numeric.
>
>At one go?
>
>So, in this column that I used the wrong property type - and now it contains CountryName + the 6 digit numbers.
>
>Is there any way I can alter the data in that column at one go and remove the CountryName altogether?

If the postal code is the last six characters, then this will do what you

want:


UPDATE mytable SET mycolumn=RIGHT(mycolumn,6) WHERE mycolumn ~ '[0-9]{6}$'

Hi Anthony, I tried what you said but very strange I received an error that said my table name is not exists. When I did a data query of all rows, all the data appeared.



TG
--
Anthony E. Greene <mailto:agreene@xxxxxxxxx
>




[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