dbTalk Databases Forums  

Fixed column problem

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Fixed column problem in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lane Lesperance
 
Posts: n/a

Default Fixed column problem - 02-13-2004 , 04:00 PM






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?

Thanks Much, Lane Lesperance

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Fixed column problem - 02-13-2004 , 11:06 PM






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/featu...le.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


"Lane Lesperance" <llesperance (AT) yahoo (DOT) com> wrote

Quote:
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?

Thanks Much, Lane Lesperance



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.