Problem trying to modify a table

  • Hi All:

    I'm trying to modify a table that has a column set to "allow nulls" to not allow nulls. When using the EM table designer to make the change, I get this error message:

    'Notes' table

    - Unable to modify table.

    Cannot insert the value NULL into column 'Notes',

    table 'Collect.dbo.Tmp_Notes';

    column does not allow nulls. INSERT fails.

    The statement has been terminated.

    Thanks for any help on this

    William

  • I was in a similar sitituation. I first updated the column to a space and than alterted the table  to not allow nulls.

    Depending upon number of records and data type, you can do a simple update in query analyzer. Mine was char(50) and about 5000 records.

     

     

  • The reason is that, a constraint can be applied only when there is no conflict with the existing data.

    So be sure that you handle that before

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply