Hey everyone. Can anyone help me come up with a script that will allow me to import a text file that's in the format shown below? I'm trying to import each text file field item into a separate field in the database table "Data Archive". For example, the P.O box number which in this case is 105243, would be imported to the box number field in the table. The site number 12 would go into the Site Number field. The transaction code 4101 would go into the Trancode field. And fianlly the volume 00000000000009552 would go into the volume field in the table.
The text file has spaces between each line which is what is giving me a fit. Please look at the file layout and example below. If anyone can help please do.
Text File Layout:
a = Lockbox #: (6) digits and (4) leading spaces. Postions 1 - 10
b = Site ID: (2) digits and (8) leading spaces. Postions 11 - 20
c = ISA #: 10 spaces. Postions 21 - 30. Not used currently
d = Cust #: 5 spaces. Postions 31 - 35. Not used currently
e = RG Key: 11 spaces. Postions 36 - 46. Not used currently
f = Tran Code: (4) digits (4) spaces. Postions 47 - 50
g = Record #: 4 spaces. Postions 51 - 54. Not used currently
h = Count #: 2 Spaces. Postions 55 - 56. Not used currently
i = Volume (17) digits, zero padded to the left of volume. Postions 57-73
j = Dollars (14) digits, zero padded to the left of volume. Postions 74-87
k = Description: 240 spaces. Postions 88 - 327
l = GL #: 23 spaces. Postions 328 - 350
m = Adjustments: 3 spaces. Postions 351 - 353
Text File Example:
105243 12 4101 00000000000009552
105243 12 4102 00000000000000325
105243 12 4108 00000000000043838
105243 12 4110 00000000000043838
105243 12 4205 00000000000000002