Error while pushing data from excel to database

Error thrown while pushing data from excel to database.
I attached the error screenshot


May be the query string is too long.
Please check.

Query contains only 8 columns

String or binary data would be truncated (Error number 8152) is a very common error.
It usually happens when we try to insert any data in string (varchar,nvarchar,char,nchar) data type column which is more than size of the column. So you need to check the data size with respect to the column width and identify which column is creating problem and fix it. It is very simple if you are dealing with less columns in a table. But it becomes nightmare if you are dealing with inert into query with huge number of columns and you need to check one by one column.

Karthik Byggari

Ok, Thanks for the reply.
I will try.

1 Like

Hi @swathi_rao

Check and increase the varchar length of the database columns. This error occur when you try to insert string values that are greater in length than what you have specified in the database table as @KarthikByggari mentioned…