I have to create an import routine for a large set of data from a CSV. The problem is that the information is set out in three sections. Header, Address, item. So the Data can look like this
A1, Header info 1, header info 2, header info 3, ...,
B1, Address info 1, Address info 2, Address info 3, ...,
C1, Item info 1, Qty, Price, nett, Vat, Discount, Total
C1, Item info 2, Qty, Price, nett, Vat, Discount, total
A1, Header info 1, .......................
B1,.......................
C1,.................
C1.................
C1.................
As you can see all invoices have 1 line for the header and 1 line for the Address and then muliple lines for the item info.
I need to be able to copy the unique number assigned to the row A1 and copy it into the rows B1 and the multiple rows C1 and when it finds the next A1 type line to copy the new unique number and copy it in the same manor.
Is this possible.
As there are multiple files of this type is it also possible to automate the process of opening them and saving the new file in one large database or even beter would be to save them in three seperate databases (based on line typ A1,B1,C1) which i can then link based on the unique number as a primary Key.
A1, Header info 1, header info 2, header info 3, ...,
B1, Address info 1, Address info 2, Address info 3, ...,
C1, Item info 1, Qty, Price, nett, Vat, Discount, Total
C1, Item info 2, Qty, Price, nett, Vat, Discount, total
A1, Header info 1, .......................
B1,.......................
C1,.................
C1.................
C1.................
As you can see all invoices have 1 line for the header and 1 line for the Address and then muliple lines for the item info.
I need to be able to copy the unique number assigned to the row A1 and copy it into the rows B1 and the multiple rows C1 and when it finds the next A1 type line to copy the new unique number and copy it in the same manor.
Is this possible.
As there are multiple files of this type is it also possible to automate the process of opening them and saving the new file in one large database or even beter would be to save them in three seperate databases (based on line typ A1,B1,C1) which i can then link based on the unique number as a primary Key.