Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9235627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:05:47+00:00 2026-06-18T07:05:47+00:00

One of my coworkers is using SQL Server 2000 and is having a display

  • 0

One of my coworkers is using SQL Server 2000 and is having a display issue where an XML column using data type ntext is displaying <Long Text>. I’m guessing that’s because the character length is too short (16), but it will not allow any changes.

When trying to alter the data type to varchar a warning appears. Will changing the datatype from ntext to varchar/nvarchar affect the data in the table?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:05:48+00:00Added an answer on June 18, 2026 at 7:05 am
    1. Changing to varchar will potentially lose Unicode information, e.g.

      DECLARE @x NVARCHAR(1) = NCHAR(257);
      
      SELECT @x, CONVERT(VARCHAR(1), @x);
      

      Results:

      ----  ----
      ā     a
      -- these are NOT the same!
      
    2. Changing to nvarchar(<=4000) will potentially lose any data > 8000 bytes (4000 characters). Which may be okay if the designers chose ntext but never stored more than 4000 characters, but you should check that first:

      SELECT COUNT(*) FROM dbo.table WHERE DATALENGTH(next_column) > 8000;
      

      If this returns 0, you are probably safe to convert to NVARCHAR(4000), but you will still not have an easy time modifying long text data using the SSMS tools (that is not what they’re for) and you still may have impacts to your applications

    3. You may have applications or stored procedures that have special handling for ntext columns, for example they may rely on functions like READTEXT, WRITETEXT, UPDATETEXT and TEXTPTR. You’ll want to search your codebase for these commands (here is one way to start looking at stored procedures that may contain these):

      SELECT o.name
        FROM sysobjects AS o
        INNER JOIN syscomments AS c
        ON o.id = c.id
        WHERE c.[text] LIKE '%READTEXT%'
           OR c.[text] LIKE '%WRITETEXT%'
           OR c.[text] LIKE '%UPDATETEXT%'
           OR c.[text] LIKE '%TEXTPTR%';
      

      Some chances there for false positives, hence “one way to start“.


    But if I were in your shoes I would not just change the type.

    Also, the 16 is not the character length (I can assure you you can fit more than 16 characters in that column). text and ntext data is not stored on the data page (since it won’t fit on a single page), and the 16 bytes is the number of bytes that represent the pointer so that, when the page is read, it can tell SQL Server where, off-row, to go find the actual data.

    The real answer is to stop using the graphical tools in SSMS to look at (and especially to modify!) data. If you want to view the contents of an ntext column, you can select a substring, e.g.

    SELECT CONVERT(NVARCHAR(4000), ntext_column) FROM dbo.table;
    

    …or do this in an application. But don’t use Open Table or EDIT TOP n ROWS as a spreadsheet.

    Another real answer is to get off of SQL Server 2000 already. In modern versions of SQL Server there is a much friendlier data type called nvarchar(max).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of my coworkers needs a piece of data from a 3rd party website.
I have a SQL Server report project in VS 2005 that won't preview one
One of my coworkers is working on a SQL query. After several joins (workers
One of my coworkers just came to me with an interesting problem. He's displaying
SQL Server 2000 Standard, Windows 2003 My coworker removed 'BUILTIN\Administrators' group from SQL Server
One of my coworkers is having a problem pushing changes from git on his
I have a localization issue. One of my industrious coworkers has replaced all the
One of my coworkers wrote a .NET windows service that converts .doc to .docx
One can say a type parameter T must have a specific supertype S_1: class
One useful tip I've been using for XCode is adding breakpoints on exceptions .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.