in reply to Re: Process Text File and Write to Database
in thread Process Text File and Write to Database
I call the execute at the bottom. It looks like I don't understand the use of 'next' in this context, so I'm open to other suggestions as to how to read that file line by line and add the records to the database. When I reach a line that contains the word 'profit' or 'Government', that is the end of a record. Within a record, I need to skip lines that match 'Councils', 'Continuing', and 'Mapping' as these are irrelevant lines of data. The problem is that not all records contain all three of those lines, so I can't just arbitrarily increase a counter. I was having a good deal of success reading the file to an array and then using a 'for' loop, but I stumble across the cases where I need to toss out those irrelevant lines.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Process Text File and Write to Database
by Blackavar (Initiate) on Nov 20, 2009 at 20:04 UTC | |
|
Re^3: Process Text File and Write to Database
by keszler (Priest) on Nov 20, 2009 at 19:35 UTC |