Sub ConvertPumperToNumber
Dim txt2, MyPumper, MyInitials As String
Dim Cursor1 As Cursor
txt="SELECT DISTINCT PUMPER FROM " & DBTableName & " WHERE PUMPER IS NOT NULL OR PUMPER ='' "
Cursor1=SQL1.ExecQUERY(txt)
Dim cursor2 As Cursor
txt2="SELECT * FROM " & DBTableName & " WHERE PUMPER IS NOT NULL OR PUMPER ='' "
cursor2=SQL1.EXECQUERY(txt2)
Dim J As Int=900
For i= 0 To Cursor1.rowcount -1
Cursor1.position=i
MyPumper=Cursor1.getstring("PUMPER")
For k=0 To cursor2.rowcount-1
cursor2.position=k
MyInitials=cursor2.getstring("PUMPER")
If MyInitials=MyPumper Then
txt="UPDATE " & DBTableName &" SET PUMPER = ? WHERE PUMPER=?"
SQL1.ExecNonQuery2(txt, Array As Object(J+i, MyInitials ) )
End If
Next
Next
Cursor1.close
cursor2.close
End Sub