Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hoRLk-0001A6-QZ for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 11:46:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hoRLi-00059O-NM for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 11:46:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hoRLi-00057J-98 for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 11:46:54 +0000 Received: from sonic305-1.consmr.mail.bf2.yahoo.com ([74.6.133.40]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hoRLa-0001jY-1E for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 11:46:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1563536802; bh=SQfeUoYRttbANQucKF2WuJXnx6ngLsuJFvaXAEN09io=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=t4nzPIvmXTN47uiZguWfBPhh390mKgjfhtPprrnpamvDz+uYTHvzo9QhjqRqqktRDSV0pD1NlaUQzZHytpMMK2YipNr12/ULJrDQdJ4cmJgi/D3ac+OwKdMYjYtNBVzjXRxiNriyq6mEF6e8iZykmR476m9NSL26ruhpn6qvL95eaCnqA09Nq7hxdrgBIKwYW5WbOup6zJqH7/E/m4bvSh04S3lJHpwpZk3ytjkGSNOGJed1jxyZmFgz9gBK+NnLxQKJH7KnFlzQuyXXfQmHY+AXKZru1/f+LGp8ptnm2B3xi06dOLRg8S3P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xTIt55WAHY07 gVXv.ZbTLCN8zSj3kUlD0BQ9HW_B3yRfcSNQ7NyokDtJ8UjD4hWpxTrbGW9rxgYSh6XD7eHsB8C7 W3baIbCB2ebtSZai3mIK0PJM29TcdQsqh9fu1oCUblXiuWltAWBW4NuHzjjl5jIvMz_2t3mnGLgH vgZtGBiHu.aRZO1lTClz7WfMiouakipj5BLgu8ELxM_VC6rnfH2u2UwFfDkXbLCnFqbL44iJHYMH ZSy1H Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Fri, 19 Jul 2019 11:46:42 +0000 Date: Fri, 19 Jul 2019 11:46:41 +0000 (UTC) From: Karen Goh To: Shreeyansh Dba Cc: Pgsql-admin Message-ID: <549903142.2203182.1563536801681@mail.yahoo.com> In-Reply-To: References: <503592305.1895694.1563463763702@mail.yahoo.com> Subject: Re: How do I add/edit 'digit' property into PGAdmin4 ? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2203181_571651275.1563536801680" Content-Length: 5491 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_2203181_571651275.1563536801680 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 contain= s CountryName + the 6 digit numbers. Is there any way I can alter the data in that column at one go and remove t= he CountryName altogether? I tried using pgAdmin4 but it is not working...:( On Friday, July 19, 2019, 12:14:04 AM GMT+8, Shreeyansh Dba wrote: =20 =20 Hi Karen, Use below query to change column type text to integer/numeric. alter table alter column type int using (column_= name::int); alter table alter column type numeric using (col= umn_name::numeric); Hope this will help you. Thanks & Regards, Shreeyansh DBA Team www.shreeyansh.com On Thu, Jul 18, 2019 at 8:59 PM Karen Goh wrote: Hi all, I need help to change an existing column in my table from text to 'digit' t= ype. However, I can't find any numeric or integer property type. The digit type should contains numbers only but it is not for calculation.= =C2=A0 It is a zipcode that has 6 digit numbers. Please let me know how do I alter the text type to digit type.=C2=A0 If alt= eration is not possible, how do I add in the property into PGAdmin4 which i= s running on windows 10. Thank you. =20 ------=_Part_2203181_571651275.1563536801680 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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 t= erms of how to edit the data in this column that I want to change to numeri= c.

At one go?

So, in this column that I used the wrong proper= ty 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?

I tried using pgAdmin4 but it is not working= ...:(
=
=
On Friday, July 19, 2019, 12:14:04 AM GMT+= 8, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


=
Hi Karen,

Use below query to change column type text to int= eger/numeric.

alter table <table_na= me> alter column <column_name> type int using (column_name::int);<= br clear=3D"none">alter table <table_name> alter column <column_na= me> type numeric using (column_name::numeric);

Hope this will help you.

Thanks & Regards,
Shreeyansh DBA Team
www.shreeyansh.com


On Thu, Jul 18, 2019 at 8:5= 9 PM Karen Goh <k= arenworld@yahoo.com> wrote:
Hi all,
<= br clear=3D"none">I need help to change an existing column in my table from= text to 'digit' type.

However, I can'= t find any numeric or integer property type.

The digit type should contains numbers only but it is not for calcul= ation.  It is a zipcode that has 6 digit numbers.
Please let me know how do I alter the text type to digit t= ype.  If alteration is not possible, how do I add in the property into= PGAdmin4 which is running on windows 10.

Thank you.


------=_Part_2203181_571651275.1563536801680--