Hi,
I need to increase the data type of a column.
I need to increase the data type of a column from numeric(10,2) to numeric(20,2)
I am using the below command -
ALTER TABLE t ALTER COLUMN c SET DATA TYPE numeric (20,2);
but it fails giving the following error -
Error Code: 2377, SQL State: 0A000] [Vertica][VJDBC](2377) ROLLBACK: Cannot convert column c from "numeric(10,2)" to type "numeric(20,2)"
Any help would be much appreciated.
Thanks,
Samuel
Modify/Increase/Decrease the data type of a column
Moderator: NorbertKrupa
-
- Newbie
- Posts: 5
- Joined: Thu Mar 26, 2015 4:45 pm
Modify/Increase/Decrease the data type of a column
Regards,
Samuel
Samuel
-
- Intermediate
- Posts: 163
- Joined: Tue Jun 19, 2012 2:44 pm
- Location: Rio de Janeiro
- Contact:
Re: Modify/Increase/Decrease the data type of a column
Not possible , even if you have no data in that table !
See more details here. About restrictions.
http://my.vertica.com/docs/7.1.x/HTML/i ... taType.htm?
See more details here. About restrictions.
http://my.vertica.com/docs/7.1.x/HTML/i ... taType.htm?
trying so hard !!!
-
- Newbie
- Posts: 5
- Joined: Thu Mar 26, 2015 4:45 pm
Re: Modify/Increase/Decrease the data type of a column
Thanks Adrian.
I am doing the long way of creating a new column and then dropping the old one and renaming the new one to old one.
I am doing the long way of creating a new column and then dropping the old one and renaming the new one to old one.
Regards,
Samuel
Samuel