Hi Hermes. I wrote a quick vb script to alter your text file, instead of using access. I think it should work for you.
If you create a new text doc using note pad, and paste the below into it and save it as "Blah.VBS", you should be able to just double click the file you created, and it will read your csv, and create a new one that is corrected.
Change "C:\Test.CSV" to your actual file name, "Include Quotes"
Change "C:\Fixed.CSV" to the name of the file you want created.
Hope it helps,
ChaZ
'------------------------------------------
Const ForReading = 1, ForWriting = 2
Set objWS = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objReadInput = objFSO.OpenTextFile("C:\Test.CSV", ForReading, True)
Set NewFile = objFSO.OpenTextFile("C:\Fixed.CSV", ForWriting, True)
M_SO = ""
SO_Count = 0
Do Until objReadInput.AtEndOfStream
Tstr = objReadInput.ReadLine
if left (Tstr, 9) <> M_SO then
M_SO = left (Tstr, 9)
SO_Count = 0
End if
SO_Count = SO_Count + 1
New_L = left (Tstr, 10) & chr(34) & (So_Count) & chr(34) & ","
New_L = New_L & mid (Tstr, 12, 100)
NewFile.writeline New_L
loop
There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.