I am trying to copy a table from an oracle server to a filegdb table. I can get the searchcursor to work and I can get the insercursor to add all the rows but the field values are all blank. Any ideas?
arcpy.CreateTable_management(targetPath,targetTableName,SourceTableFullPath,"#")
field_names = [f.name for f in arcpy.ListFields(SourceTableFullPath)]
edit = arcpy.da.Editor(targetPath)
edit.startEditing(False,True)
edit.startOperation()
cursor = arcpy.da.InsertCursor(TargetTablefullPath,field_names)
i = 0
for row in arcpy.da.SearchCursor(SourceTableFullPath, field_names, sourceFilterString):
i = i + 1
print row[0] + " " + row[1]
cursor.insertRow(row)
if i > 10:
print i
break
print "added rows?"
edit.stopOperation()
edit.stopEditing(True)
del row
del cursor