我有一系列试图进入数据库的 .txt 文件。
第 7 行“包含”破折号和空格的分隔。像 excel 这样的工具会根据整个文件尝试和空格分隔。但第 7 行之后的行在字段内有空格。
从一篇文章中,我发现我设法创建了一个 cmd.bat 脚本来删除前 6 行和页脚。现在我需要关于如何使用 row7“分隔”文件的建议。之后删除 row7 将是一个奖励。4 个字段的长度波动,因此固定字段长度不是选项。将不胜感激任何帮助。
Report Number: ST-49 ENERGY RESOURCES CONSERVATION BOARD Page 1 of 1
Run Date: 01 Jan 2012 DAILY DRILLING ACTIVITY LIST
For the Notification Period 31 Dec 2011 To 01 Jan 2012
WELL ID WELL NAME LICENCE +----------------CONTRACTOR-----------------+ RIG ACTIVITY DATE FIELD CENTRE BA ID LICENSEE NEW PROJECTED ACTIVITY
BA ID NAME NUMBER TOTAL DEPTH TYPE
------------------- ----------------------------------- -------- ------ -------------------------------------- ------ ----------------------- -------------- ----- ------------------------------------- ------------- -----------
00/04-11-028-28W4/0 ECA CROSSE 4-11-28-28 0438271 0Y52 Precision Drilling Corporation 239 31 Dec 2011 10:30:00 PM Midnapore 0026 EnCana Corporation Drill To LD
00/10-21-038-24W4/0 ECA HAYNES 10-21-38-24 0439238 0Y52 Precision Drilling Corporation 154 31 Dec 2011 11:00:00 PM Red Deer 0026 EnCana Corporation Drill To LD
00/04-08-049-18W5/0 HUSKY MINEHEAD 4-8-49-18 0440874 0Y52 Precision Drilling Corporation 401 01 Jan 2012 01:00:00 PM Drayton Valley 0R46 Husky Oil Operations Limited Drill To LD
TOTAL - Drill To LD - Drilling to Licensed Depth = 15
TOTAL - Re-entry - Re-entry of an Abandoned Well = 0
TOTAL - Resumption - Resumption of Drilling of a Non-abandoned Well = 0
TOTAL - Set Surface - Drilling to Set Surface Casing Only = 2
TOTAL NUMBER OF WELLS LISTED = 17
*** END OF REPORT ***