=SQLExec(h, "EXEC sp_helpindex '"+Alltrim(Tablename)+"'","Indices")
for each table in turn, and appending from this cursor into that table, you get all the index definitions in it. Then you include that table into your tool, and on target system you run the same loop to get the existing indexes into a temp cursor. Then you compare your source table with this and generate the code to build indexes which are missing. Something like cSQL = "CREATE INDEX ["+Alltrim(tagname)+"] ON "+; ALLTRIM(Tablename)+" ("+Alltrim(lcDexfields)+")"You can fill these three variables from the source table.