insert data from text file into new field

civileng

Registered User.
Local time
Today, 10:32
Joined
Apr 15, 2013
Messages
12
I have i large text file from wich i would like to extract info and put it in new fields in access.

Text file looks like this:

...
Urni podatki
Prometni odsek: 00273 PRIKLJUČEK DRNOVO - DRNOVO / Števno mesto: 871 CP Drnovo / Vhodna STM: 871 / Tip štetja: QLD6
Smer 1: PRIKLJUČEK DRNOVO - DRNOVO
Smer 2: DRNOVO - PRIKLJUČEK DRNOVO
....

And it repeats like this many times throug text file.

I would like to extract number after ''Prometni odsek'' and insert it in a new field with the same name, string after ''PRIKLJUČEK'' for a new field, and number after ''Števno mesto'' and strings after text Smer 1, Smer 2 also each in a new field.

I would like red text/numbers in new fields

Prometni odsek......PRIKLJUČEK.......Števno mesto
00273.................blabla1-blabla2...00871

The file size iz ~500MB if this could be a problem, and text format-like above that contains desired info repeats every ~8000lines. How would the module for this be?
 
Does your sample represent 1 record or 5?

-Normal way to these is to bring the data into a temporary/working table
-Create/design a table to hold the fields you need
-Create queries or function to pick up the piece of code you need from working table and move it to Table you need
-Test the logic with a field or 2
-Build appropriate Loops to iterate over the working table

You may have to build several routines to get all the values you want and to update the Table you need.
 
It's 1 record.
I will try to find similar vb code and adapt it.
 

Users who are viewing this thread

Back
Top Bottom