Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import A Text file (List) into a Table format

Status
Not open for further replies.

AMOSMP

IS-IT--Management
May 12, 2004
4
0
0
GB
Hi,

I have the following Text file that can be extracted from our legacy system (see example below..) but it is extracted as a list. Is it possible to import this in such a way so that it is in a standard table foramt (accross)?

Thanks in advance

T

C0_1000000ð860001
C1_*** M/T "SHIP" ***
C8_1166
C30_1166
C0_1010000ð860001
C1_*** DRAWINGS & MANUALS
C8_1166
C30_1166
C0_1010100ð860001
C1_MACHINERY DRAWINGS/MANUALS
C8_1166
C30_1166
C0_1010200ð860001
C1_ELECTRICAL DRAWINGS/MANUALS
C8_1166
C30_1166
C0_1010300ð860001
C1_HULL DRAWINGS/MANUALS
C8_1166
C30_1166
C0_2840000ð860001
C1_*** CARGO TANKS
C0_2840110ð860001
C1_CARGO OIL WING TANK No1 - STBD
C2_15,436 m3/98% 15,127
C3_F: 95 - 105 / S
C8_1166
C12_1
C15_C704
C16_M12
C17_0M19960101
C19_D
C21_G1
C30_1166
C0_2840120ð860001
C1_CARGO OIL TANK No1 - CNTR
C2_33,190 m3/98% 32,526
C3_F: 95 - 105 / C
C8_1166
C12_1
C15_C704
C16_M12
C17_24M19960124
C19_D
C21_G1
C30_1166
C0_2840130ð860001
C1_CARGO OIL WING TANK No1 - PORT
C2_15,436 m3/98% 15,127
C3_F: 95 - 105 / P
C8_1166
C12_1
C15_C704
C16_M12
C17_24M19960124
C19_D
C21_G1
C30_1166
C0_2840210ð860001
C1_CARGO OIL WING TANK No2 - STBD
C2_21,925 m3/98% 21,487
C3_F: 85 - 95 / S
C8_1166
C12_1
C15_C704
C16_M12
C17_0M19960101
C19_D
C21_G1
C30_1166
C0_2840220ð860001
C1_CARGO OIL TANK No2 - CNTR
C2_33,152 m3/98% 32,489
C3_F: 85 - 95 / C
C8_1166
C12_1
C15_C704
C16_M12
C17_24M19960124
C19_D
C21_G1
C30_1166
C0_2840230ð860001
C1_CARGO OIL WING TANK No2 - PORT
C2_21,925 m3/98% 21,487
C3_F: 85 - 95 / P
C8_1166
C12_1
C15_C704
C16_M12
C17_24M19960124
C19_D
C21_G1
C30_1166
C0_2840310ð860001
C1_CARGO OIL WING TANK No3 - STBD
C2_15,348 m3/98% 15,041
C3_F: 75 - 82 / S
C8_1166
C12_1
C15_C704
C16_M12
C17_0M19960101
C19_D
C21_G1
C30_1166
C0_2840320ð860001
C1_CARGO OIL TANK No3 - CNTR
C2_33,001 m3/98% 32,341
C3_F: 75 - 85 / C
C8_1166
C12_1
C15_C704
C16_M12
C17_24M19960124
C19_D
C21_G1
C30_1166
 
Hi

It would be neccessary to know a bit more about the actaul data to give a finitive answer, the key thing is, is it consistent (ie each record has all rows present, even if empty)?

If yes you could import it a single column table, then write some VBA and a query to convert that list into a conventional table

Do not see many questions relating to what appears to be ship design/construction data, I spent almost 20 years woking in IT in that environment, happy days



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thanks for the tip Ken,

The data is not always present, if no data the field is omitted.

The database is used for Vessel Maintenance Management, we are migrating legacy systems to Windows versions (Relational databases). Current system is Btrieve in DOS.

T
 
Hi

Many years ago I came across a company who specialisted in the field of Spares and Ships Maintenance Systems, maybe they could help you, from Google I found

SIR JOSEPH ISHERWOOD, North Shields, The Centre for Advanced Ind, Coble Dene, Royal Quays, North Shields, Tyne & Wear, NE29 6DE, Tel: +44 (0)191 257 5522, Fax: +44 (0)191 257 5533, e-mail: sji@isherwoods.com, Web site: ISO 9001, Managing Director: Peter Rossiter, Technical Manager: Mike Hartley, IT Manager: Lee Hall

I have not connection with them so cannot say more

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Based on the assumption that the first three or four characters ( C0_ to C30_ ) are used to indentify the field, then loading this into a normal Access table is fairly straightforward. You read the records, line by line, populate the corresponding field according to its Cxx_ value. When you hit a C0_ record, you know it's time to update the record you've been working on, and start a new one.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top