How to re-map a table?

  • Hello,

    I've imported a table into my database from .csv file and now I need to re-map few columns from nvarchar to int.
    But when I click on the table and select Design, at the end an error message appears "Saving changes is not permitted. The changes you have made require following table to be dropped and re-created."
    I want to change that, because I believe nvarchar values are the issue which is responsible for returning error values in aggregation functions in SSRS.
    Any help would be appreciated. The same error while mapping database during the import process.

  • jirakst - Wednesday, February 15, 2017 1:42 PM

    Hello,

    I've imported a table into my database from .csv file and now I need to re-map few columns from nvarchar to int.
    But when I click on the table and select Design, at the end an error message appears "Saving changes is not permitted. The changes you have made require following table to be dropped and re-created."
    I want to change that, because I believe nvarchar values are the issue which is responsible for returning error values in aggregation functions in SSRS.
    Any help would be appreciated. The same error while mapping database during the import process.

    It is a setting in Options which you have to change.
    😎

  • Could you please navigate me?

  • Tools -> Options -> Designers -> Table and Database Designers -> Uncheck "Prevent saving changes that require table re-creation"

  • Well you can do it in SQL, ALTER TABLE <TABLE NAME> ALTER <COLUMN NAME> int

    Keep in mind you might very well have values in the table that can't be converted to an int and you'll get an error.

  • Thank you to both of you. It already works fine.

Viewing 6 posts - 1 through 5 (of 5 total)

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