Inserting irregular data into SQL Server
I have a file of data which I want to regularly insert into a table in SQL Server 2008. The file contains several fixed width text fields and one field which is free text and very long.
When I try to insert the data via SSIS I get error messages telling me that data has been truncated and if I choose to ignore truncation then the free text field is simply not imported and I get an empty field. If I try to use a bulk insert I get a message saying that I am exceeding the maximum row size of 8060.
The free开发者_如何学C text field which is causing the problem contains a lot of white space so one option would be to trim it before I insert it but I am not sure how to do this.
I'm afraid I cannot post any sample data as it is of a sensitive, medical nature.
Could anyone suggest a possible solution to this problem?
精彩评论