dbTalk Databases Forums  

Parsing a text file

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


Discuss Parsing a text file in the microsoft.public.sqlserver.dts forum.



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

Default Parsing a text file - 07-28-2005 , 09:36 AM






Hi:

I have setup DSNs before to text files with some success. I am having
problems with a file I have to parse to pump into SQL Server via DTS.
It appears to be fixed length (what does the 'length' refer to
normally-the text plus the spaces to get to the first character in the
next column?). I keep getting errors saying there is a problem with the
schema .ini file, or it just recognizes the file as one field. I've
tried using tab delimited as well but no luck.

It's perhaps hard to describe this-I could send the text file along if
someone would like to have a look. If there are any other ways other
than ODBC of parsing a difficult text file please let me know.

Thanks,
Kayda


Reply With Quote
  #2  
Old   
Scot T Brennecke
 
Posts: n/a

Default Re: Parsing a text file - 07-28-2005 , 09:51 AM






You can send the file to me at the following address (remove spaces and use punctuation as
indicated):
S c o t B at M V P s dot o r g

"kayda" <tabladude (AT) gmail (DOT) com> wrote

Quote:
Hi:

I have setup DSNs before to text files with some success. I am having
problems with a file I have to parse to pump into SQL Server via DTS.
It appears to be fixed length (what does the 'length' refer to
normally-the text plus the spaces to get to the first character in the
next column?). I keep getting errors saying there is a problem with the
schema .ini file, or it just recognizes the file as one field. I've
tried using tab delimited as well but no luck.

It's perhaps hard to describe this-I could send the text file along if
someone would like to have a look. If there are any other ways other
than ODBC of parsing a difficult text file please let me know.

Thanks,
Kayda




Reply With Quote
  #3  
Old   
Scot T Brennecke
 
Posts: n/a

Default Re: Parsing a text file - 07-28-2005 , 10:41 AM



For the benefit of others, here's what I found in response to the file sent:
* Specify Text File as data source
* Choose "Delimited" file format, ANSI, {LF}
* Check first row has column names
* Click [Next]
* Specify Other column delimiter and type a single space in the edit box
* Data is now correctly parsable by your columns.

"Scot T Brennecke" <ScotB (AT) MVPs (DOT) spamhater.org> wrote

Quote:
You can send the file to me at the following address (remove spaces and use punctuation as
indicated):
S c o t B at M V P s dot o r g

"kayda" <tabladude (AT) gmail (DOT) com> wrote in message
news:1122561389.451268.18530 (AT) f14g2000cwb (DOT) googlegroups.com...
Hi:

I have setup DSNs before to text files with some success. I am having
problems with a file I have to parse to pump into SQL Server via DTS.
It appears to be fixed length (what does the 'length' refer to
normally-the text plus the spaces to get to the first character in the
next column?). I keep getting errors saying there is a problem with the
schema .ini file, or it just recognizes the file as one field. I've
tried using tab delimited as well but no luck.

It's perhaps hard to describe this-I could send the text file along if
someone would like to have a look. If there are any other ways other
than ODBC of parsing a difficult text file please let me know.

Thanks,
Kayda






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.