alter columns with not null value RRS feed

  • Question

  • hi

    i have 2 columns in my table which would ideally get inserted with the same information, but one is not null.

    i now need to increase the allowed character limit for these columns from 255 to 510 due to an insert error i am seeing in my application.

    error: java.sql.SQLException: ORA-12899: value too large for column

    i need help with constructing a query for the not null column

    alter table pfuser.archivepointentrysync alter column apesname nvarchar(510) not null

    alter table pfuser.archivepointentrysync alter column apesdisplayname nvarchar(510) null

    the second query goes through fine and updates the char limit to 510 successfully.

    however the first query for the not null column is failing.

    error:  the object uk_apes is dependent on column 'apesname'.

    alter table alter column apesname failed because one or more objects access this column.

    i am not too good with these queries, any help is appreciated please.

    • Moved by Shanky_621MVP Monday, October 30, 2017 4:59 PM question related to Oracle
    Monday, October 30, 2017 1:04 PM

All replies

  • You will need to drop the index uk_apes, make the column change and then add the unique index back.
    Monday, October 30, 2017 1:07 PM
  • And by the way the error message suggests you're on Oracle

    This is MS SQL Server forum

    To get Oracle specific help, you may be better off posting this in Oracle related forums.

    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    Monday, October 30, 2017 1:35 PM