|
-
Feb 4th, 2004, 06:56 AM
#1
Thread Starter
Addicted Member
Stripping lines of info from a text file
Hi All,
can anyone tell me how i could strip lines of code from a text file. The file is something like
ABC|123|FGH|THG
DEF|XVZ|123|999|
All lines to not have unique field locations so i cannot do a straight forward import. I need to get each line that starts with let's say "ABC" and drop those into a table.
Thanks in advance.
-
Feb 4th, 2004, 10:00 AM
#2
Junior Member
If your text really has "|" between the sections of code,why not just open the text file in Excel and use the "|" character as a delimiting signifier? That way you'll get something like:
A B C D
1 ABC 123 FHG THG
2 DEF XVZ 123 999
-
Feb 4th, 2004, 11:29 AM
#3
Thread Starter
Addicted Member
I can do that but there are varying feild lengths within the text file, for example the ABC row may have 6 feilds and the DEF row may have 16 fields.
I am wanting to go through the text file line by line and then filter out the ABC's and then validate each line to ensure the data is accurate.
Importing into Excel or Access means that I have to run an additional query against the Information to filter out the appropriate rows and I am trying to do it in 1 step with as little intervention as possible from the user.
thanks for your reply.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|