Only needing those first few fields makes it a lot simpler. I'll assume that
the records are in a text file, with line breaks where they appear in your
sample data, and that the [Op] field extends to the end of the first line of
the record. If that's right, here's one way to go at it.
1) Import the text file into a new table. In the import wizard, select
Delimited, set the delimiter to the pipe character "|" and the text qualifier
to {none}.
2) The table will have just one field, probably called F1, with one record
for each line of the text file. Use a delete query with this criterion
Not Like "*Type: *Status:*"
to get rid of all the records that don't correspond to the first line of the
text records.
3) Go to table design view and add fields for RecordNumber, Type, Status and
Op.
4) Use an update query with expressions that extract the values from the
original field and put them in the new fields.
There are various ways of building the calculated fields. I'd probably use
my rgxExtract function (downloadable from
http://www.j.nurick.dial.pipex.com/Code/ )
in which case the expressions in the "update to" cell for the various fields
would be like this:
RecordNumber: rgxExtract([F1], "^\d+")
Type: rgxExtract([F1], "Type:\s+(.+)\s+Status:")
Status rgxExtract([F1], "Status:\s+(.+)\s+Op:")
Op: rgxExtract([F1], "Op:\s+(.+)$")
Alternatively you can use the standard string functions such as Instr() and
Mid() to locate "fixed points" such as "Type: " and " Status:" and return the
characters between them.
:
Yes I can. Here is 5 records. To be more specific all I really need is:
RecordNumber:
Type:
Status:
Op:
The rest of the record could be discarded.
100001 Type: GAS Status: SP Op: CONTINENTAL RESOURCES, INC (170979)
PENICK, DOUGLAS #1 Bond: BS777800
Todd County Topo: ALLENSVILLE Carter Coord: 25 C 30 1240FNL 1520FEL
PI, NO RECORDS ON FILE
10156 Type: SRI Status: AI Op: CONTINENTAL RESOURCES, INC (170979)
HOLLIMAN, S H #2 Depth: 2087 Bond: BS777800
Hopkins County Topo: NORTONVILLE Carter Coord: 12 I 25 2520FNL 2360FWL
SRI WELL, ALL RECORDS ON FILE, NO VIOLATIONS, TRANS FROM HAR-KEN OIL CO
10/16/97, TRANS FROM FARRAR OIL CO 9/26/01
10161 Type: OIL Status: PR Op: CONTINENTAL RESOURCES, INC (170979)
WILLIAM & DRAKE HEIRS #4 Depth: 1707 Bond: BS777800
Hopkins County Topo: NORTONVILLE Carter Coord: 8 I 25 170FSL 580FEL
OIL WELL, ALL RECORDS ON FILE, NO VIOLATIONS, TRANS FROM HAR-KEN OIL CO
10/16/97, TRANS FROM FARRAR OIL CO 9/26/01
10162 Type: OIL Status: PR Op: CONTINENTAL RESOURCES, INC (170979)
WILLIAM & DRAKE HEIRS #5 Depth: 2185 Bond: BS777800
Hopkins County Topo: NORTONVILLE Carter Coord: 13 I 25 1020FNL 590FEL
OIL WELL, ALL RECORDS ON FILE, NO VIOLATIONS, TRANS FROM HAR-KEN OIL CO
10/16/97, TWIN WELL TO PERMIT#89337, TRANS FROM FARRAR OIL CO 9/26/01
10362 Type: OIL Status: PR Op: CONTINENTAL RESOURCES, INC (170979)
HOLLIMAN, S H #3 Depth: 2114 Bond: BS777800
Hopkins County Topo: NORTONVILLE Carter Coord: 12 I 25 2950FNL 1500FWL
OIL WELL, ALL RECORDS ON FILE, NO VIOLATIONS, TRANS FROM HAR-KEN OIL CO
Thank you
:
What do you mean by "everything in CAPITAL letters would be its own
field"? I guess you want to parse the string of text into fields
somewhat along these lines:
RecordNumber: 100001
Type: GAS
Status: SP
Op: CONTINENTAL RESOURCES, INC (1780979) PENIC, DOUGLAS #1
Bond: BS777800
Todd County Topo: ALLENSVILLE
Carter Coord: 25 C 1240FNL 1520FEL, PI, NO RECORDS ON FILE
This probably won't be very difficult, but it's *essential* to
understand the task and the data before you start. Can you post half a
dozen or so sample records which between them illustrate the range of
variability in the structure and values - and for each of them also show
exactly what the result needs to be.
On Wed, 14 Feb 2007 09:39:18 -0800, glnbnz
I have a question I hope can be answered.
How can I change information from paragraph form to table form.
Example:
100001 Type: GAS Status: SP Op: CONTINENTAL RESOURCES, INC (170979)
PENICK, DOUGLAS #1 Bond: BS777800
Todd County Topo: ALLENSVILLE Carter Coord: 25 C 30 1240FNL 1520FEL
PI, NO RECORDS ON FILE
I would like to convert the above paragraph into a table.
Everything in CAPITAL letters would be its own field straight across.
This is a part of a large text document with hundreds of records.
Thank you