MySQL Forums
Forum List  »  Stored Procedures

Parse a Text file and store it in a table
Posted by: Mano Publico
Date: March 12, 2016 09:54AM

Hi everyone,

Here is my question:

I have a Text file from which I'd like to retrieve some data then insert them into a table.

1) There's no delimiter structuring data in this file.
2) Each line start with a specific code that help to target the right line to be processed (not all lines are candidate)
3) Each data to be extracted are located at a known position

I'm new to Stored routines usage and was wondering about the best way to achieve this operation.

I already know I'll have to implement some looping, condition, search text function, table update statement, but dont really know where to start and how to structure my stored procedures / functions.

Actually, the result will be an input for a BPM application.
This application is expecting to receive this text file in an FTP folder.
Then the application is able to move the file and insert it in a one-column-table.

So the stored routine I'd like to develop would parse this one-column-table and do the treatment I've described previously.

Could you please provide some advices

Mano Publico

Options: ReplyQuote

Written By
Parse a Text file and store it in a table
March 12, 2016 09:54AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.