Changing a column from ntext to nvarchar(max)

  • Hi

    I want to change a column in one of my tables from ntext to nvarchar(max), I was just wandering if there is likely to be any kind of data loss when doing this or any other mishap that could occur?

    Thanks

    Matt

  • I changed Northwind sample database in both SQL Server 2005 and 2008 and did test run of all the code and all appeared fine so just run tests. The reason is NVarChar(max) actually adds most ANSI SQL operations that are invalid with NText.

    Kind regards,
    Gift Peddie

  • Matt (8/20/2009)


    Hi

    I want to change a column in one of my tables from ntext to nvarchar(max), I was just wandering if there is likely to be any kind of data loss when doing this or any other mishap that could occur?

    Thanks

    Matt

    Heh... the answer is "No" but why trust a post on the internet... use SELECT/INTO to make a copy of the table and try it. 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

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

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