472,371 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 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 1244
"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.
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...

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.