Hi everyone!
I have some Text files to be imported to my database. These files simply don't have a field delimiter. This is pretty much the actual situation of my files:
79324817350003235658981449032
The description for this file is as follow:
characters
1 to 10 represents the telephone number
11 to 24 represents the company tax ID
25 to 30 represents a zip code
... it might have more fields depending on each file. I have files with 10 more fields than this one.
I am planning to use the "insert" pascal function to add the desired character in each line of the txt file. e.g:
var
s:string;
begin
s:=';';
Insert(myFileCurentLIne, s, 11);
...
end;
That should work for the first set of characters. But what about the other sets (11-24, 25-30, etc)?
I was wondering if this is the case to use Records, and if so, how could a fill my record var with multiple values according to the amount of needed delimiter for each file? Let's say I need to add ";" 5 times on the position 11, 25, 31, 39, and 44 on each line of my txt file.
How to solve this problem?
Thank you all,
J