mcdhappy80
Registered User.
- Local time
- Today, 03:49
- Joined
- Jun 22, 2009
- Messages
- 347
I have a text file I need to import but my problem here is that the first row of that text field contains the data about the text file (which I also need to use), but has different number of fields than the rest of the file. The text file is Fixed-width and each row is 360 characters long but first row differs than all the rest.
The first solution that came to my mind to solve this is to delete the first row and import other rows, but I need to have the possibility to connect the first row data with all the other data (something like orders list).
After viewing the things that way other thing that popped out was to create three tables, one will store all the first row data of the text document, the other will store all other row records, and in the third I will connect on which first row record comes all other records.
Thinking this is easy, but I need to automate this process, and from my standpoint I don't know which steps to use, and I also need some code samples how to import the text, then, how to import just the first row in one table, how to import all other records in other table, and finally how to connect them in third table.
Any help is useful on this matter.
Thank You
The first solution that came to my mind to solve this is to delete the first row and import other rows, but I need to have the possibility to connect the first row data with all the other data (something like orders list).
After viewing the things that way other thing that popped out was to create three tables, one will store all the first row data of the text document, the other will store all other row records, and in the third I will connect on which first row record comes all other records.
Thinking this is easy, but I need to automate this process, and from my standpoint I don't know which steps to use, and I also need some code samples how to import the text, then, how to import just the first row in one table, how to import all other records in other table, and finally how to connect them in third table.
Any help is useful on this matter.
Thank You