Sub SQLDuplicate
Private Table1 As List
Private Table2 As List
Private Items() As String
Table1.Initialize
Table2.Initialize
Table1.Clear
Table1 = SQL1.ExecQuery("SELECT distinct * FROM sites")
For i = 0 To Table1.Size - 1
Private Map1 As Map
Map1.Initialize
Items = Table1.Get(i)
Map1.Clear
Map1.Put("SiteName", Items(0))
Map1.Put("Longitude", Items(1))
Map1.Put("Latitude", Items(2))
Table2.Add(Map1)
Next
SQL1.ExecNonQuery("DELETE FROM sites")
DBUtils.InsertMaps(SQL1, "sites", Table2)
End Sub