473,387 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Text file import with DTS

Does anyone know if it's possible to use the wizard or DTS Designer to
accept a source file with the following simplified format:

<field1label>: <record1field1value>
<field2label>: <record1field2value>
- - - - - - -
<fieldNlabel>: <record1fieldNvalue>

<field1label>: <record2field1value>
<field2label>: <record2field2value>
etc.

i.e. each input record is delimited by {LF}{LF}, and each column by {LF}. Or
will it be necessary to write a Perl script (say) to convert it first into a
..csv file?

Thanks,

Dave

--
************************************************** **********************
Dave Stone e-mail: D.*****@ed.ac.uk
Computing Services Telephone: +44 131-650-3314
University of Edinburgh Internal ext: 503314
Main Library, George Square FAX: 0131-650-3308
Edinburgh EH8 9LJ
************************************************** **********************
Jul 20 '05 #1
2 4334
Dave,
I'm not sure if your problem is related to the delimiter or the file
format. If the problem is the delimiter and you can't get the file to read
in at all, then not sure I can help without an actual sample of the file and
some testing.
If the problem is the file format, then I would suggest first reading
your file into a temp table and then running a procedure to massage and make
any data corrections, and insert the massaged data into your production
tables.
I use this for all my DTS packages, even if they are very similar to my
production tables just so I can do any data checking first.

Best regards,
Chuck Conover
www.TechnicalVideos.NET


"Dave Stone" <D.*****@ed.ac.uk> wrote in message
news:c1**********@scotsman.ed.ac.uk...
Does anyone know if it's possible to use the wizard or DTS Designer to
accept a source file with the following simplified format:

<field1label>: <record1field1value>
<field2label>: <record1field2value>
- - - - - - -
<fieldNlabel>: <record1fieldNvalue>

<field1label>: <record2field1value>
<field2label>: <record2field2value>
etc.

i.e. each input record is delimited by {LF}{LF}, and each column by {LF}. Or will it be necessary to write a Perl script (say) to convert it first into a .csv file?

Thanks,

Dave

--
************************************************** **********************
Dave Stone e-mail: D.*****@ed.ac.uk
Computing Services Telephone: +44 131-650-3314
University of Edinburgh Internal ext: 503314
Main Library, George Square FAX: 0131-650-3308
Edinburgh EH8 9LJ
************************************************** **********************

Jul 20 '05 #2
Thanks for your reply, Chuck. I am assuming that it's essentially the
delimiter(s) that is giving the problem. When I define the row delimiter as
{LF}{LF} and hit 'Next', the Text File Properties dialog returns the message
about not finding the row delimiter within 8K. I've checked a dump of the
file, and there certainly is a {LF}{LF}sequence much sooner than that.

Because the individual fields of a record each have a separate line in the
input file, I would set the column delimiter to a single {LF}, but it's not
even giving me the chance to do that. So I reckon it just don't like my row
delimiter.

When I've loaded data before using DTS, the records have been transformed by
a Perl script into a one-long-line-per-record format, with commas as field
separators, and vertical bars as text qualifiers. The process is untidy
though, and I had hoped to find a bulk input route which would handle text
input files in one-column-per-input-line format.

I'm wondering if the similarity of my preferred format to the way XML
documents are normally laid out is a hint?

Dave

"Chuck Conover" <cc******@commspeed.net> wrote in message
news:10**************@news.commspeed.net...
Dave,
I'm not sure if your problem is related to the delimiter or the file
format. If the problem is the delimiter and you can't get the file to read in at all, then not sure I can help without an actual sample of the file and some testing.
If the problem is the file format, then I would suggest first reading
your file into a temp table and then running a procedure to massage and make any data corrections, and insert the massaged data into your production
tables.
I use this for all my DTS packages, even if they are very similar to my production tables just so I can do any data checking first.

Best regards,
Chuck Conover
www.TechnicalVideos.NET

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris | last post by:
Background: I am using a MS Access 2000 front end with SQL Server 8.0 back end. I have the requirement to import all text files (regardless of filename) from a given folder on the network into a...
1
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no...
5
by: Johnny Meredith | last post by:
I have seven huge fixed width text file that I need to import to Access. They contain headers, subtotals, etc. that are not needed. There is also some corrupt data that we know about and can...
2
by: Michael Thomas | last post by:
Hi everyone Do any of you know if this is possible in Access either by using the import tool or by writing a module in VB: I have a database containing information for a retail chain which,...
2
by: Phil Latio | last post by:
We have despatch process which kicks out picking information into text files at hourly intervals. The text files are named sequentially by process; 'ABC.txt', 'ABC01.txt', 'ABC02.txt' for one...
1
by: ghadley_00 | last post by:
Hi, I have a MS access database table for which I regularly need to import fixed width text data. At present I have to to cut and paste the text data from its source to a text file, save the...
13
by: DH | last post by:
Hi, I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them...
1
by: Child of His | last post by:
I have been through every trick I know, or has been suggested. I have a one to two million line fixed field database in text format. I want to bring it into Access 97. When I use the external...
4
by: chimambo | last post by:
I have 2 problems: 1. I want to import a single text file into an access table using a Macro. I am however getting an error that I need to put a specification name argument. What does this mean?...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.