Hello. I have a scipt the reads and imports a text file into a database table. Below is an example of the text file I'm importing and the script I'm using to accomplish the import. You'll notice at the beginning of 3 of the lines in the file you see the number 84. What I need to be able to do is skip the first two lines where 84 appears and import the last line containing 84 and then continue to load the rest of the file. How can this be done?
Text File Example
"18",77,"Brinks Home","",08/01/2007,2146,2146,477,477,67,123,46,46,2,
"18",81,"United/Reliable Ins","",08/01/2007,762,762,241,241,136,238,0,0,0
"18",84,"Raleigh/Wake","",08/01/2007,1611,1611,68,68,17,93,0
"18",84,"Raleigh/Wake","",08/01/2007,694,694,75,75,11,10,0
"18",84,"Raleigh/Wake","",08/01/2007,2305,2305,143,143,28,
"18",88,"World Omni 88","",08/01/2007,1389,1389,525,525,
"18",89,"World Omni 89","",08/01/2007,142,142,20,20,3,7,47,47,
"18",99,"PSCU","",08/01/2007,1767,1767,2378,
"18",248,"Virginia Natural Gas","",08/01/2007,0,0,0,0,0,0,2,2,0,0,
"18",304,"Henrico County Real Estate","",08/01/2007,1,1,2,2,0,0,0,0,0,0,0,
Importing Script
Set objFile = CreateObject("Scripting.FileSystemObject")
Dim MyFile, MyFileNew
MyFile = Session("strFileName")
Set objText=objFile.OpenTextFile(MyFile)
RLog.Open "Select * From tblCoreImportTest",Conn,3,3
Do while not objText.AtEndOfStream
strTextLine=objText.Readline
data=Split(strTextLine,",")