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 8087439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:46:38+00:00 2026-06-05T18:46:38+00:00

I have a SQL table in which some columns, when viewed in SQL Server

  • 0

I have a SQL table in which some columns, when viewed in SQL Server Manager, contain <Unable to read data>. Does anyone know how to query for <Unable to read data>? I can individually modify the data in this column with update table set column = NULL where key = 'value', but how can I find whether additional rows exist with this bad data?

  • 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-05T18:46:40+00:00Added an answer on June 5, 2026 at 6:46 pm

    I would recommend against replacing the data. There is nothing wrong with it, is just that SSMs cannot display it properly in the Edit panel. The data in the database itself is perfectly fine, from your description.

    This script shows the problem:

    create table test (id int not null identity(1,1) primary key, 
        large_value numeric(38,0));
    go
    
    insert into test (large_value) values (1);
    insert into test (large_value) values (12345678901234567890123456789012345678);
    insert into test (large_value) values (1234567890123456789012345678901234567);
    insert into test (large_value) values (123456789012345678901234567890123456);
    insert into test (large_value) values (12345678901234567890123456789012345);
    insert into test (large_value) values (1234567890123456789012345678901234);
    insert into test (large_value) values (123456789012345678901234567890123);
    insert into test (large_value) values (12345678901234567890123456789012);
    insert into test (large_value) values (1234567890123456789012345678901);
    insert into test (large_value) values (123456789012345678901234567890);
    insert into test (large_value) values (12345678901234567890123456789);
    insert into test (large_value) values (NULL);
    go
    
    select * from test;
    go
    

    The SELECT will work fine, but showing the Edit Top 200 Rows in object explorer will not:

    UnableToEditData

    There is a Connect Item for this issue. SSMS 2012 still exhibits the same problem.

    If we look at the Numeric and Decimal details we’ll see that the problem occurs at a weird boundary, at precision 29 which is actually not a SQL Server boundary (precision 28 is):

    Precision   Storage bytes
    1 - 9   5
    10-19   9
    20-28   13
    29-38   17
    

    If we check the .Net (SSMS is a managed application) decimal precision table we can see quickly where the crux of the issue is: Precision is 28-29 significant digits. So the .Net decimal type cannot map high precision (>29) SQL Server numeric/decimal types.

    This will affect not only SSMS display, but your applications as well. Specialized applications like SSIS will use high precisions representation like DT_NUMERIC:

    DT_NUMERIC An exact numeric value with a fixed precision and scale.
    This data type is a 16-byte unsigned integer with a separate sign, a
    scale of 0 – 38, and a maximum precision of 38.

    Now back to your problem: you can discover invalid entries by simply looking at the value. Knowing that the C# representation range can accommodate values between approximate (-7.9 x 1028 to 7.9 x 1028) / (100 to 28)` (the range depends on the scale) you can search for values outside the range on each column (the actual values to search between will depend on the column scale). But that begs the question ‘what to replace the data with?’.

    I would recommend instead using dedicated tools for import export, tools that are capable of handling high precision numeric values. SSIS is the obvious candidate. But even the modest bcp.exe would also fit the bill.

    BTW if your values are actually incorrect (ie. true corruption) then I would recommend running DBCC CHECKTABLE (...) WITH DATA_PURITY:

    DATA_PURITY

    Causes DBCC CHECKDB to check the database for column values that are not valid or out-of-range. For example, DBCC CHECKDB detects
    columns with date and time values that are larger than or less than
    the acceptable range for the datetime data type; or decimal or
    approximate-numeric data type columns with scale or precision values
    that are not valid.

    For databases created in SQL Server 2005 and later, column-value integrity checks are enabled by default and do not require the
    DATA_PURITY option. For databases upgraded from earlier versions of
    SQL Server, column-value checks are not enabled by default until DBCC
    CHECKDB WITH DATA_PURITY has been run error free on the database.
    After this, DBCC CHECKDB checks column-value integrity by default.

    Q: How can this issue arise for a datetime column?

    use tempdb;
    go
    
    create table test(d datetime)
    
    insert into test (d) values (getdate())
    
    select %%physloc%%, * from test;
    
    -- Row is on page  0x9100000001000000
    
    dbcc traceon(3604,-1);
    
    dbcc page(2,1,145,3);
    
    Memory Dump @0x000000003FA1A060
    0000000000000000:   10000c00 75f9ff00 6aa00000 010000             ....uùÿ.j .....
    Slot 0 Column 1 Offset 0x4 Length 8 Length (physical) 8
    
    dbcc writepage(2,1,145, 100, 8, 0xFFFFFFFFFFFFFFFF)
    

    Edit top 200

    dbcc checktable('test') with data_purity;
    

    Msg 2570, Level 16, State 3, Line 2 Page (1:145), slot 0 in object ID
    837578022, index ID 0, partition ID 2882303763115671552, alloc unit ID
    2882303763120062464 (type “In-row data”). Column “d” value is out of
    range for data type “datetime”. Update column to a legal value.

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

Sidebar

Related Questions

I have a SQL Server 2005 table which lists customers and their order lines
I have a table which contains my ads that can be searched in sql-server-2008.
I have an SQL Server 2005 table that has a varchar(250) field which contains
Using SQL Server 2012 Express. I have a table which represents key/value pairs. keycol
In a SQL Server 2000 DB, I have a table which holds string representations
I am using Microsoft SQL Server. I have a Table which had been updated
I have a myism table 'test' which holds some out-dated data, now I want
I have an sql table with some nvarchar columns, lets call them 'Title' and
In SQL we have a scheme script that creates tables which has some logic
I have a long SQL Script which I run to pre-populate some temp tables.

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.