Jump to content

Help breaking notes field into separate fields / records


crodseth

Recommended Posts

I have a notes field (actually 2700+ notes fields) that contains the contents of a word document.  I am trying to break apart this notes field, so that I can save the information into proper fields.  Please see an example of the notes field below:

May 20, 1997 -- SHIPPING REPORT


W.O. CUSTOMER DESCRIPTION QTY CARRIER 


12237-1 Robinson Power Fuel sending unit 1-C U.P.S.


13209 Jackson Power 3306 gen set w/trailer-enclosure 1-P Inway Trans.
ENG SN:  9NR01413


13227 Jackson Power Touch up paint   W U.P.S.

As you can see, the notes field contains what essentially should be three separate records.  What I'd like to do is break this apart somehow and resave it to a separate table as three separate records, each with the date at the top of the notes fields.  I know I can do a little bit of exploding to break down certain parts, however the patterns on these note fields are not always the same.  For example the second 'record' on this notes field has a second line.  I'm just wondering if anybody has any words of wisdom.  The fields are tab separated, so I can explode them with \t but after that I'm lost.  Thank you.

between records it looks like a blank line right? I did this once and I had to replace in my entire file all double line breaks with a | - then I replace all line breaks with '' (nothing) - this gave me a long line with | seperating the records. Then I replaced | with a new line break - now there is one record per line and you can explode on \t

Hope this helps

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.