It's hard to respond with specifics without knowing more about your database and tables. Most likely, you'd import the data into an interim table and run a script to process the data into updates to your other tables.
Thank you for your post.
It appears that whenever a "20" is encountered in the first two positions, you want to take the number starting in the 13th position of that string. It appears the invoice number is 6 characters in length, but looking at the third line that also begins with "20", the invoice number is 5 characters. What is the maximum number of characters of an invoice? For this example, let's assume it is 8.
Create a table for importing. Each line of the file will be imported into a field "Import" as separate records. Create a calculation field, INVOICE NUMBER, with the formula:
If ( Left ( Import ; 2 ) = "20" ; Trim ( Middle ( Import ; 13 ; 8 ) ) ; "" )
This looks for the line beginning with "20". If true, then we start at the 13th character, take the contents for the next 8 characters, and then remove (trim) any spaces.
Let me know if this works correctly for you.
Thanks very much for your answer! I will try this out as soon as possible!!