Hi George, Thanks for your help. I ended up, thank to the help of the forum, I ended up doing a second cursor, I'll attach the code below. Spatial Join is a solution I didn't explore, but I'll try.Cause otherwise I now have to find a way to append the tables...import arcpy
arcpy.env.overwriteOutput = True
arcpy.env.workspace = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Default.gdb'
ws = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Default.gdb'
Comuni = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Sardegna3.gdb\\Comuni'
Linee = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Sardegna3.gdb\\Linee'
rows = arcpy.SearchCursor(Comuni)
for row in rows:
print row.NOME
feat = row.Shape
arcpy.SelectLayerByLocation_management("Linee", "INTERSECT", feat, selection_type="NEW_SELECTION");
out_feature_class = arcpy.ValidateTableName("Linee_Clip_" + row.NOME);
table = arcpy.TableToTable_conversion("Linee", ws, out_feature_class);
arcpy.AddField_management(out_feature_class, 'Comune', 'TEXT', '', '', '60');
arcpy.AddField_management(out_feature_class, 'ISTAT', 'TEXT', '', '', '6');
rows2 = arcpy.UpdateCursor(table)
for row2 in rows2:
row2.Comune = str(row.NOME)
row2.ISTAT = str(row.CODISTAT)
rows2.updateRow(row2)