I'm trying to import records into an SQL database file from a comma-delimited flat file and I get a "Text was truncated or one or more characters had no match in the target code page." when the source file has more than 50 characters in a particular field. The Destination file target for that field is 1000 characters, so that shouldn't be an issue. I narrowed it down to "A123456789B123456789C123456789D123456789E123456789" in the text file did import while "A123456789B123456789C123456789D123456789E123456789F" threw the error.
How can I get it to allow more characters before truncating?
I found the answer in the second answer to: Importing CSV file into SQL server... Thanks to Eoan for that.
Ultimately, in the Advanced Editor of the source datafile, on the Input and Output Properties tab, under External Columns, there is a Length property that defaults to 50. Changing that to match the Target Database File did the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With