dbTalk Databases Forums  

Problems importing fixed-field file

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


Discuss Problems importing fixed-field file in the microsoft.public.sqlserver.dts forum.



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

Default Problems importing fixed-field file - 05-27-2006 , 07:13 PM






I have a file with fixed-length fields and a table with matching length
columns. I'm trying to use DTS to import the file but find that if a
record in the file is a bit short, DTS doesn't import it. For example,
if I had fields of widths:

FirstName 5
LastName 4
Company 10

the file:

John Doe Acme Inc.<NL>
Jane Doe<NL>

would fail to load the second record. This means that I'd have to pad
the file before loading it:

John_Doe_Acme Inc.<NL>
Jane_Doe_________<NL>

(_s provided to show spaces) which is just sad. I'm sure this must be
a _very_ common problem but formulating the right query for google has
proven difficult. help?

TIA - erick


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

Default Re: Problems importing fixed-field file - 05-29-2006 , 03:32 AM






Hello ekkis,

May be this article can help in this instance?

http://www.databasejournal.com/featu...le.php/1462341


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I have a file with fixed-length fields and a table with matching
length columns. I'm trying to use DTS to import the file but find
that if a record in the file is a bit short, DTS doesn't import it.
For example, if I had fields of widths:

FirstName 5
LastName 4
Company 10
the file:

John Doe Acme Inc.<NL
Jane Doe<NL
would fail to load the second record. This means that I'd have to pad
the file before loading it:

John_Doe_Acme Inc.<NL
Jane_Doe_________<NL
(_s provided to show spaces) which is just sad. I'm sure this must be
a _very_ common problem but formulating the right query for google has
proven difficult. help?

TIA - erick




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.