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

  • Home
  • SEARCH
  • 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 6115945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:09:01+00:00 2026-05-23T15:09:01+00:00

I am over SQL Server 2008 and I have a field with a huge

  • 0

I am over SQL Server 2008 and I have a field with a huge amount of data. When I apply…

DATALENGTH(field_name)

… I get to know my field is 288.946 characters long, but on MS SQL Server Management Studio, when I try to copy-paste the result of a simple SELECT of that field into a text editor (Notepad+), it seems like SQL Server only packs 43.679 characters… Or is it that the buffer for copying text in Windows is blowing the maximum number of characters? I have tested already and the limit isn’t with Notepad+ line size or something… If I copy-paste into a new query window in SQL Server, the result is the same text string limited to 43.679 characters.

Well, the question is: I need to copy-paste the whole content of that field… Is there something special I should do in my query? Thank you.

  • 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-05-23T15:09:01+00:00Added an answer on May 23, 2026 at 3:09 pm

    I filed a bug against this during the beta of SQL Server 2008. They closed it as “fixed” but then commented that it was a duplicate of a Vista issue. Which surprised me because it appears in several other SSMS / operating system combinations as well, including Denali CTP1 on Windows 7.

    http://connect.microsoft.com/SQLServer/feedback/details/344150/ssms-grid-will-not-display-43-679-characters-from-varchar-max

    So, I’m not sure why they’ve called it fixed, because it is most certainly still a real limitation.

    If you have < 64K, you can convert to XML then click on the result in grid mode. Unfortunately with more than that you’re pretty limited to what SSMS is going to be able to get for you. You’ll need to export to a flat file as others have suggested, use a different program to pull the data in full, or manually paste together chunks of 40000 characters. In your example you could do something like this:

    DECLARE @foo TABLE (a VARCHAR(MAX));
    
    INSERT @foo(a) SELECT REPLICATE('A', 8000);
    
    DECLARE @i INT = 1;
    
    WHILE @i < 36
    BEGIN
        UPDATE @foo SET a += REPLICATE(CHAR(@i+64), 8000);
        SET @i += 1;
    END
    
    SELECT DATALENGTH(a), a FROM @foo;
    
    SELECT SUBSTRING(a, 1, 40000),
        SUBSTRING(a, 40001, 40000),
        SUBSTRING(a, 80001, 40000),
        SUBSTRING(a, 120001, 40000),
        SUBSTRING(a, 160001, 40000),
        SUBSTRING(a, 200001, 40000),
        SUBSTRING(a, 240001, 40000),
        SUBSTRING(a, 280001, 40000)
    FROM @foo;
    

    But you’d have to adjust by adding more operations for columns with values > 320K.

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

Sidebar

Related Questions

Hello we have an SQL server application running over a low bandwith connection. We
I have a table (SQL 2000) with over 10,000,000 records. Records get added at
As I have seen, SQL 2008 no longer offers replication over internet in very
i'm running into a strange problem in Microsoft SQL Server 2008. I have a
I have these tables (in SQL-Server 2008 R2): Table1: Id Guid 1 {530D8FE1-7541-43CC-9F92-1AA776490155} 2
I have two SQL tables on SQL Server 2008 : GameData GameID PK GameReleaseDate
Are there good efficiency savings using Sql Server 2005 over Sql Server 2000? Or
I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not
In SQL server 2005 this query select len(cast('the quick brown fox jumped over the
How do you restore a database backup using SQL Server 2005 over the network?

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.