all groups > sql server dts > february 2004 >
You're in the

sql server dts

group:

Fixed column problem



Fixed column problem llesperance NO[at]SPAM yahoo.com
2/13/2004 2:00:29 PM
sql server dts: I setup up a DTS import task using fixed fields. When trying to find
out why some of my records were not being imported, I noticed that the
records have lf (line feeds) right after the last significant field in
the record. The programmer told me that the extract coming from SAP
was 200 characters, but I think that trailing spaces must have been
removed somewhere in the process. Out of 17000 records being imported,
only about half of them are being loaded. Also I get no warnings about
this. Does anyone have any recommendations short of having the
extracts being rewritten?

Re: Fixed column problem Allan Mitchell
2/14/2004 5:06:52 AM
You can pretty much terminate a row with whatever you want as Darren writes
here

Coping with text files and abnormal column or row delimiters
(http://www.sqldts.com/default.aspx?257)

So the fixed width format that you thought you were getting is now thought
not to be the case?

You can pad the row to the correct size

http://www.databasejournal.com/features/mssql/article.php/1462341

Or you could import the file as 1 field terminating on the lf

You then do the fancy stuff inside the package by splitting the 1 row 1
field into 1 row many fields

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

AddThis Social Bookmark Button