467,122 Members | 1,270 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,122 developers. It's quick & easy.

reading external data that hase 2 formats

Hallo here
I like to read a external data file.( text file )

But the data is not consistent.

As you see in 1 line ther is the word 'ceasing'
but not in the other

How do i get the right data in the right feeld ?

Thanks.

Rolf

----------------------------------------------------------------------------
--------
Data:

NW=AXE,NE=RK *** ALARM CEASING 132 A2/APT
NW=AXE,NE=GN *** ALARM CEASING 383 A2/APT
NW=AXE,NE=DH *** ALARM CEASING 936 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 970 A2/APT
NW=AXE,NE=GN *** ALARM CEASING 385 A2/APT
NW=AXE,NE=VO *** ALARM 223 A2/APT
NW=AXE,NE=VO *** ALARM CEASING 223 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 975 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 976A2/APT
NW=AXE,NE=VO *** ALARM 224 A2/APT
NW=AXE,NE=VO *** ALARM 225 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 977 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 978 A2/APT


Nov 12 '05 #1
  • viewed: 1140
Share:
2 Replies
"Rolf" <r.froger@home.(nederland)> wrote in message
news:bv**********@news3.tilbu1.nb.home.nl...
Hallo here
I like to read a external data file.( text file )

But the data is not consistent.

As you see in 1 line ther is the word 'ceasing'
but not in the other

How do i get the right data in the right feeld ?

Thanks.

Rolf

-------------------------------------------------------------------------- -- --------
Data:

NW=AXE,NE=RK *** ALARM CEASING 132 A2/APT
NW=AXE,NE=GN *** ALARM CEASING 383 A2/APT
NW=AXE,NE=DH *** ALARM CEASING 936 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 970 A2/APT
NW=AXE,NE=GN *** ALARM CEASING 385 A2/APT
NW=AXE,NE=VO *** ALARM 223 A2/APT
NW=AXE,NE=VO *** ALARM CEASING 223 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 975 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 976A2/APT
NW=AXE,NE=VO *** ALARM 224 A2/APT
NW=AXE,NE=VO *** ALARM 225 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 977 A2/APT
NW=AXE,NE=LM *** ALARM CEASING 978 A2/APT

There are a number of things you could do, including writing a custom import
routine - complete with error-handling. However, if you want a quick and
easy solution why not just use the find and replace function in your
favorite text-editor to replace "ALARM CEASING" with "ALARMC". You can
always change it back after the import.
Fletcher
Nov 12 '05 #2
Hm, familiar format--although I most often work with the 6110

This having said: you can follow two less attractive approaches.

1) write your own import routine (I'd certainly do that)
2) import anyway, into an intermediate table (no indexes, no type
checking and so on) and struggle your way towards normal structure.

The definite disadvantage of (1) is that you'll have to interpret every
line by code.

What is your current table/field structure? (care to disucss this via
email? use nl instead of org)

Rolf wrote:
NW=AXE,NE=VO *** ALARM 223 A2/APT
NW=AXE,NE=VO *** ALARM CEASING 223 A2/APT


--
Bas Cost Budde

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

24 posts views Thread by Hendrik Schober | last post: by
3 posts views Thread by Tanuki | last post: by
4 posts views Thread by Yodai | last post: by
28 posts views Thread by Andrew Poulos | last post: by
3 posts views Thread by Paul Moore | last post: by
5 posts views Thread by imailz@freenet.de | last post: by
1 post views Thread by preet | last post: by
36 posts views Thread by vimal3271@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.