Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've a a flat file which is pipe delimited as shown below:


When I create a package on a 64 bit machine it always drops the last record. But on preview it shows both records.


If I do this it works:


Why is this and how do I fix it?

share|improve this question

migrated from Sep 25 '11 at 11:06

This question came from our site for professional and enthusiast programmers.

Open the file up in a hex editor and look at the line endings. My assumption is the original file doesn't have cr/lf (0A 0D) on the last line. It would probably parse just fine without the trailing | row after you've hit enter. Confirm/Deny? – billinkc Sep 25 '11 at 1:47
@billinkc as per my question. I works on XP and not on Windows Server 2008 and SQL Server 2008 R2 is installed. I also tried hitting enter many times on last record or 2nd last record, still same issue. It looks like a bug – flybyte Sep 25 '11 at 2:27
Are you sure you're not intentionally skipping the last row and all your rows have the same number of columns and delimiters? – Nick Chammas Sep 26 '11 at 14:22
It's just very very very wierd. I created a package on XP Machine to read exact same csv it works well. Imported the same package on Windows Server 2008 R2 and it just doesn't load the last record. Unbelievable – flybyte Sep 27 '11 at 1:06
same issue with csv, when deployed to sql r2 dropped last line of the text file. go to advanced column view, select all the columns and set the text qualification drop down to false for all the columns. additionally, we run our packages with the 32 bit setting on the execution tab of the step running the package. worked like a charm. – user6790 Feb 17 '12 at 16:49

I had the same problem on Windows Server 2008 R2 x64. A flat file source would not load the last record... So this answer helped me, and now it's working fine.

Go to advanced column view, select all the columns and set the text qualification drop down to false for all the columns.

share|improve this answer

I would guess the last record does not have a carriage return delimiter after it; try looking at the source file in a hex editor to verify.

share|improve this answer
Hi @SqlACID, I just had a look at my csv file with hex editor and i can see OD and OA at the last line. But still the SSIS Package on Sql server 2008 R2 SP1 is not able to read it. If there are two records it just reads the first line. – flybyte Sep 26 '11 at 11:52
@flybyte Make sure you have all the latest service packs installed? – SqlACID Oct 4 '11 at 22:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.