When importing data from Excel to SQL Server, there is an error in importing due to the Long data in the table (if the data is not very long, within 255, no error occurs):
Cause of Error:
Import and export of SQL Server to determine the data table for each field type, take the first few rows of each field in the Excel table (3 rows) to distinguish. If the first 3 is a string of less than 255, it is set to the nvarchar (255) type, so if the number of characters in the fourth or later data is greater than 255, an error will be made.
Workaround:
Before importing data, you can manually add a few unrelated data, so that the number of characters in the field is greater than 255, and SQL Server will be imported with the type set to nvarchar (max) without error. After successful import, delete irrelevant data.
An error occurred in Excel importing data into SQL Server: "The text is truncated, or one or more characters do not match in the target code page"