开发者

Reading Unformatted Text File Into Two Different Tables

I need to write a stored procedure that will read each line of an unformatted text file and record it as a record. (Simple enoug开发者_JAVA技巧h, but haven't run into an example script yet. Or my Google skills are a bit wanting.)

Here's the kicker.

It needs to read up to a certain line of text, then call another stored procedure to loop through the remaining lines to write to another table.


If it were me, I'd pre-process the file into its constituent parts. Splitting a file where the top part is one kind of content and the bottom another is a simple task in something like perl, vbscript, maybe powershell. Once you have the file split, pick your favorite way to read the contents of each file and process the contents accordingly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜