I have a text file that I need to import, however know they changed the format of the file and I having a some problems thinking up a way to import this in.
Here is the layout of the file:
FieldOne|FieldTwo|FieldThree|FieldTwo|...and so on to FieldNine. (All fields are delimited with "|", except for fieldNine, which is delimited by Fixed Width)
What I need to do is take the first eight fields and import them into TableA, then take fieldNine (which is a string with the lenght of 210 characters) break the string up and import that into TableB.
Our current process just imports that whole line into TableA (using TransferText, however the new requirement is to create a one-to-one relationship with TableB.
The only way so far that I know how to do this is to write code that opens the txt file reads a line and insert that values into the TableA, and then take fieldNine break the string using MID(), then insert and commit...
I was wondering if there is another way...each file contain 300,000+ line...so the above process may (I'm thinking) will take way to much time...
Thanks in advance for you time and ideas.
Here is the layout of the file:
FieldOne|FieldTwo|FieldThree|FieldTwo|...and so on to FieldNine. (All fields are delimited with "|", except for fieldNine, which is delimited by Fixed Width)
What I need to do is take the first eight fields and import them into TableA, then take fieldNine (which is a string with the lenght of 210 characters) break the string up and import that into TableB.
Our current process just imports that whole line into TableA (using TransferText, however the new requirement is to create a one-to-one relationship with TableB.
The only way so far that I know how to do this is to write code that opens the txt file reads a line and insert that values into the TableA, and then take fieldNine break the string using MID(), then insert and commit...
I was wondering if there is another way...each file contain 300,000+ line...so the above process may (I'm thinking) will take way to much time...
Thanks in advance for you time and ideas.