473,322 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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
2 1273
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Trader | last post by:
Hi, I'm trying to use Mark Hammond's win32clipboard module to extract more complex data than just plain ASCII text from the Windows clipboard. For instance, when you select all the content on...
24
by: Hendrik Schober | last post by:
Hi, I have a 'std::istream' and need to read its whole contents into a string. How can I do this? TIA; Schobi
3
by: Tanuki | last post by:
Hi All: I encounter a programming problem recently. I need to read a binary file. I need to translate the binary data into useful information. I have the format at hand, like 1st byte = ID,...
4
by: Yodai | last post by:
Hi all.. I'm trying to program an application for an emmbedded sistem where an external processor introduces data into my RAM. The thing is some if the data I have to pick up is written in...
28
by: Andrew Poulos | last post by:
When loading an rss feed into Windows IE, doc.childNodes.length always equals 0. If I manually delete the <!DOCTYPE tag doc.childNodes.length is correct. I'm using doc = new...
3
by: Paul Moore | last post by:
I'd like to write some scripts to analyze and manipulate my music files. The files themselves are in MP3 and FLAC format (mostly MP3, but FLAC where I ripped original CDs and wanted a lossless...
5
by: imailz | last post by:
Hi all, since I'm forced to switch from Fortran to C I wonder if there is posibility in C: 1) to use implicit loops 2) to parse several variables which number is determined at runtime. ...
1
by: preet | last post by:
This page achieves the external website content using inline frames http://www.anchorfx.com/forex/daily-trade-signals/forex-action-bias.asp can the same thing be done in javascript without using...
36
by: vimal3271 | last post by:
I want to know how to read image files in C.. what are the headers that i should include? is there any tutorials regarding this ? pls inform me.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.