Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Crespo
85 Posts |
Posted - 2002-10-23 : 05:50:18
|
| Hi there,I have a quick question regarding DTS packages (Import/Export) utility.I have a set of CSV files which I am trying to import into a set of tables.When I did my first import, I noticed that the total number of records on the database did not match the number of records in the CSV files. (The last record in the CSV files was missing from the table.Here is some sample data from the CSV file,MSH,12744,n00b8,07/12/1999,D,NMSH,12745,n00b4,21/06/1977,D,MSH,12747,n00b1,01/09/1965,D,NMSH,12772,n00b,09/01/1947,D,Now the table that I am populating has 6 fields with the last field holding N or Y or NULL if left blank.For some reason when it gets to the LAST record it doesn't insert it into the table because it doesn't have an entry AFTER the D. When I inserted a value as inMSH,12772,n00b,09/01/1947,D,Nit worked fine and the last record was inserted.Any ideas why the IMPORT/EXPORT utility does that?Best Regards.Crespo.Hewitt Bacon & WoodrowEpsomSurreyUnited Kingdom |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-10-23 : 07:00:11
|
| Is there a line feed after your last line? DTS is probably using the line feed / new line / return as the line delim, and if there isn't one at the end of the last line, it is being disregarded.Jay White{0} |
 |
|
|
Crespo
85 Posts |
Posted - 2002-10-23 : 07:09:23
|
| Thanks for the suggestion. I guess you must be right.. but I could not find anything about the (line feed/new line) in the Text File properties.Any ideas?Best Regards.Crespo.Hewitt Bacon & WoodrowEpsomSurreyUnited Kingdom |
 |
|
|
Crespo
85 Posts |
Posted - 2002-10-23 : 07:14:36
|
| Sorry about the previous reply. I must be blind!In the properties box there is a ROW DELIMITER option which I did not see at first. I had it set on {CR}{LF} which explains why it was missing the last record.Thanks for your help!Best Regards.Crespo.Hewitt Bacon & WoodrowEpsomSurreyUnited Kingdom |
 |
|
|
|
|
|
|
|