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 |
|
nlocklin
Yak Posting Veteran
69 Posts |
Posted - 2002-09-30 : 15:54:49
|
| I'm about ready to give up on SQL Server for a big project I'm working on... hopefully someone can point out what I'm doing wrong here...I'm trying to import a flat text file. Each row in the file is 179 characters long. In creating the source connection in the DTS package (or using the DTS Import/Export wizard), I set it to fixed width. When I go to specify the row delimiter, if I set it to {CR}{LF} it for some reason cuts the file off at 109 characters. When I specify <none> for Row delimiter and try to enter 179 manually, it only lets me go up to 109.My first thought was that there was something wrong with the file, so I double-checked and didn't find anything wrong. I also tried importing the file into Microsoft Access, and it imported perfectly.Has anyone had this problem? Is there a way that I can get this to work? I even tried editing the properties in disconnected edit and still can't get it to work.--"It's not that I'm lazy... it's that I just don't care." |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-09-30 : 16:08:44
|
| You'll get much better performance loading it into a staging table using BULK INSERT with the TABLOCK option and specifying a format file. Have you checked there are no nonvisible control characters present ? Check out BULK INSERT in BOL.HTHJasper Smith |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-10-01 : 05:27:18
|
| Have you tried creating a new package and just adding a source text file?It's sometimes a problem to change things in the gui if you already have a file set.Also create a new text file and just add a couple of lines yourself to make sure that the file isn't the problem.You can also use the object model to change the file width in the package itself.Note that if you have a fixed width file and you get short rows then dts (and bcp depending on the table structure) will just drop lines without giving an error.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|