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 |
|
bsj
Starting Member
2 Posts |
Posted - 2004-07-26 : 04:49:11
|
| I am trying to import a semicolon separated text file. (this in itself is not an issue). My problem is that the last line of the text file is not imported.The file is imported correctly if I open the file then add a carriage return at the end of the file. What I am trying to ask is there a way around this without manually editing the text file?? |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-07-26 : 06:03:29
|
| What process creates the text file that you want to import?It should be corrected in the system that creates that file.Duane. |
 |
|
|
bsj
Starting Member
2 Posts |
Posted - 2004-07-26 : 06:08:01
|
| Unfortunatly the file is sent to me by an external company which I have no control over!!!! |
 |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-07-26 : 06:26:46
|
| OK, I'll take a stab in the dark.1.) Create a file which contains just one carriage return in it (In notepad)2.) Save it to a name carriagereturn.txt3.) The first step of your import package must now be a transact sql task which contains this one statement:xp_cmdshell 'type carraigereturn.txt >> yourimportfilename.txt'This will append a carriage return to your import file.Hope this works.Duane. |
 |
|
|
|
|
|