Cleaning up an import

S

skc

Hi,

I want to create an import routine to import .txt files
into an Access20000 table and making sure fields go into
the right places.

Here is a sample extract:

-----------------------------------------------------------
-----------------------------------------------------------
--
| | 17.Calls :- Listed as Recorded
(M) | Eclipse v2.52 |
|----------------------------------------------------------
-----------------------------------------------------------
-|
| -- Reporting Period -- | Minimum Cost
0000.05 MC | Run on Mar
19 09:58 |
| Thu Feb 19 2004 00:00 | Dept Code
CH.UTI . .
| Page 0001 |
| Thu Mar 18 2004 23:59
| . . .
... | of 0138 |
-----------------------------------------------------------
-----------------------------------------------------------
--
From To Access
Dialled Number Name Ring N/R Xr
Op Cost
----------------------------------------------------------
-----------------------------------------------------------
-
Thu Feb
19

ALL 09:03 0:00:36 EXT 267 BT 761
9 118119
Local 0.46
ALL 09:05 0:00:29 EXT 267 BT 700
9 0.06
ALL 09:09 0:01:02 EXT 267 BT 760
9 0.06
ALL 09:06 0:04:01 EXT 250 BT 748
9 0.33
ALL 09:16 0:00:38 EXT 267 BT 705
9 0.06
ALL 09:20 0:00:34 EXT 233 BT 702
9 0.06
ALL 09:20 0:00:59 EXT 267 BT 708
Local 0.46

I want to throw away lines beginning with a "-". Also,
lines begininng with Feb 13 should be created in a new
column and copied down as the dates change as the file
goes on. The .txt contains thousands of lines.

Please help me or give me pointers.

Thanks,

Skc
..
 
S

Sigurd Bruteig

skc said:
Hi,

I want to create an import routine to import .txt files
into an Access20000 table and making sure fields go into
the right places.

Here is a sample extract:

-----------------------------------------------------------
-----------------------------------------------------------
--
| | 17.Calls :- Listed as Recorded
(M) | Eclipse v2.52 |
|----------------------------------------------------------
-----------------------------------------------------------
-|
| -- Reporting Period -- | Minimum Cost
0000.05 MC | Run on Mar
19 09:58 |
| Thu Feb 19 2004 00:00 | Dept Code
CH.UTI . .
| Page 0001 |
| Thu Mar 18 2004 23:59
| . . .
.. | of 0138 |
-----------------------------------------------------------
-----------------------------------------------------------
--
From To Access
Dialled Number Name Ring N/R Xr
Op Cost
----------------------------------------------------------
-----------------------------------------------------------
-
Thu Feb
19

ALL 09:03 0:00:36 EXT 267 BT 761
9 118119
Local 0.46
ALL 09:05 0:00:29 EXT 267 BT 700
9 0.06
ALL 09:09 0:01:02 EXT 267 BT 760
9 0.06
ALL 09:06 0:04:01 EXT 250 BT 748
9 0.33
ALL 09:16 0:00:38 EXT 267 BT 705
9 0.06
ALL 09:20 0:00:34 EXT 233 BT 702
9 0.06
ALL 09:20 0:00:59 EXT 267 BT 708
Local 0.46

I want to throw away lines beginning with a "-". Also,
lines begininng with Feb 13 should be created in a new
column and copied down as the dates change as the file
goes on. The .txt contains thousands of lines.

Please help me or give me pointers.

Thanks,

Skc
Hi
You probably have to import the complete txt file, and then run a set of
querys on the table to get the result you want.

Sigurd
 
Top