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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:30:03+00:00 2026-05-16T05:30:03+00:00

Hi I am having a problem when trying to update a table using an

  • 0

Hi I am having a problem when trying to update a table using an IN clause, I have a big list of clients that should be updated 4500+.

Update table 
set columnA = 'value'
where ID in ( biglistofids )  //biglistofids > 4500 ids

I am getting this error
“String or binary data would be truncated.”

I tried the same script with fewer ids lets say (2000) and it worked fine.

I have also tried using a temporal table but I got same error.

  1. SELECT Id INTO tmpTable FROM dbo.table WHERE id IN (biglistofids) //create temporal table succesfully
  2. Update table set columnA = 'value' FROM table INNER JOIN tmpTable ON table.ID = tmpTable.ID

Is there any way to handle this, without repeating code for each 2000 records?

Thanks in advance

  • 1 1 Answer
  • 1 View
  • 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-16T05:30:04+00:00Added an answer on May 16, 2026 at 5:30 am

    The "String or binary data would be truncated." has nothing to do with the IN clause.

    It means in this line:

    set columnA = 'value' 
    

    you are setting columnA to something that is too long to be held in columnA.

    Maybe certain ids have corresponding data that is too long, and these are not among the first 2000 you have tried.

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

Sidebar

Related Questions

I'm having a problem trying to create a Javascript function that checks all the
I am having problem that when i am trying to submit the form by
I have been having this annoying problem when trying to implement a picture gallery
I'm having a pretty big problem trying to create navigation on my page. If
I'm trying to update a table in my AccessDB and i'm having a weird
For few days now I'm trying to solve this problem. I have table group_user,
I'm having a strange problem when trying to updated a div with a couple
I am having a problem trying to use the prependTo() function in jQuery... for
I'm having a problem trying to format the output on the jQuery UI datepicker.
I'm having a problem trying to make eclipse and aspectj work for Dynamic Web

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.