Dear All,
I have a case, and would you or somebody help me with this case.
background :
I have files with *.txt extension on a folder. the files name was contain store name.
example : 000001.txt in that folder it means stored number 000001.
beside that, this file contain some text inside it. that to define which one on that data was belong to, we need to define it by LENGTH.
example : 000001.txt file have this kind of data inside that files.
057577501B10Sereal 500gr118205000016000001000016000620 000000000000000000000000000000000000000000016000 00000000000 0000000000000000000600000000012000000000000000000000000000 0
and this data, was delimit by LENGTH.
example :
length 1-9 was TransactionNo.
length 10-12 was TransactionType
length 13-24 was Product
etc
i have this table that contain StroreNo,TransactionNo,TypeTran,Product columns.
TO BE
i want to extract this data and load it into my table in database.
so the mapping will be like this :
FileName (from file name. exp: 000001) -> StoreNo
length 1-9 -> TransactionNo
length 10-12 -> TransactionType
length 13-24 -> Product
could some one give me a clue or tutorial how to do it?
any help i'll appreciate.
Best Regards,
Bambang