I have the need to be able to set a value of a gdb table to the NEXTVAL of an Oracle sequence. I have to be able to do this through an ArcPy function that will also handle setting the ArcPy OBJECTID in the table (such as InsertCursor will automatically increment that field).
I have tried the following with no luck:
my_insert = arcpy.InsertCursor(My_SDE_Table_Path)new_record = my_insert.newRow()new_record.setValue('SEQUENCED_ID', 'MYSEQUENCE.NEXTVAL')my_insert.insertRow(new_record)This just attempts to write the string "MYSEQUENCE.NEXTVAL" to that field.
Anybody know of a solution to use sequences with ArcPy? I've scoured the Esri documentation but it's like a labyrinth.
أكثر...
I have tried the following with no luck:
my_insert = arcpy.InsertCursor(My_SDE_Table_Path)new_record = my_insert.newRow()new_record.setValue('SEQUENCED_ID', 'MYSEQUENCE.NEXTVAL')my_insert.insertRow(new_record)This just attempts to write the string "MYSEQUENCE.NEXTVAL" to that field.
Anybody know of a solution to use sequences with ArcPy? I've scoured the Esri documentation but it's like a labyrinth.
أكثر...