Re: Importing selected data from a fixed length text file.
From: John Nurick (j.mapSoN.nurick_at_dial.pipex.com)
Date: 07/13/04
- Next message: LC: "Access VBScript"
- Previous message: Alex: "Link thru ODBC"
- In reply to: Juster1954: "Importing selected data from a fixed length text file."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 13 Jul 2004 20:35:52 +0100
Another approach would be to obtain a "grep" utility, e.g. by
downloading the Gnu utilities from http://unxutils.sourceforge.net/
Then use a command like this at a command prompt to run grep and copy
just the "FH" records into another file:
grep "^FH" "D:\Folder\My File.txt" > "D:\Folder\FH Only.txt"
The new file will contain jsut the one type of record and can therefore
be imported by Access's text import wizard.
On Mon, 12 Jul 2004 15:54:03 -0700, "Juster1954"
<Juster1954@discussions.microsoft.com> wrote:
>I have a text file that contains three types of fixed length records,
each type containing diffrent field information and sizes. The first
field has a type indicator (i.e. FH=File Header, FC=Trans Type &
FD=Trans Detail). I just want to import the records where the first 2
characters of the record are equal to FH. Is there any easy way to
select records from a text file on importation??? Any help would be
much appreciated.
-- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email.
- Next message: LC: "Access VBScript"
- Previous message: Alex: "Link thru ODBC"
- In reply to: Juster1954: "Importing selected data from a fixed length text file."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|