I have an excel spreadsheet that is giving me an error for a specific column. It’s a truncate error so i am needing to check each cell in column O for length >= 8000. The datatype is varchar(max) so by checking this i can see which row is being rejected. This error occurred when trying to import the data into SQL server. I need to find which row is causing the error and fix it so i can import the data. The error actually states its either a truncate exception or a invalid character so this method will at least solve one of the questions. The top row is the column names if that matters. I believe i need something like this LEN(Column O) >= 8000 but im not very excel savy so hopefully i can find help here 🙂
Share
Create a new column in the raw data. Call it “Greater than 8000”
Put a formula in the next cell down (row 2 I assume). Then put this formula in there:
=IF(LEN(O2)>8000,"YES","NO")copy and paste the formula to the last cell row.
Then apply a filter to the data (click on a1, then click Home–>Sort & Filter –> Filter). Then go to the new column “Greater than 8000” and filter for “YES”.