AnsweredAssumed Answered

How can I insert a record N amount of times using cursors?

Question asked by Ernestocd on Jan 25, 2017
Latest reply on Jan 25, 2017 by dkwiens

I need to generate a polygon FC using some records previously flagged as 'NUMBER_GT_NUMBER_END = 1'

These records need to be loaded into a new schema of the same FC in order to include duplicates that will be used later for other processes. If you run the code as I am giving it here, it will print out the number of records per OBJECTID. The issue is that I am able to insert only one for each case. Once added a record into the new FC schema, I want to update the SITUS_STREET_NUMBER field with the value stored in x + 1. I have been going back and forth with other approaches like using Append, Copy, among others, but the process is really slow in comparison to the one achieved so far using the da.cursors.

Example:

OBJECTID = 28964 ---> 3 records

4815

4816

4817

This means that the above polygon geometry with OBJECTID = 28964 needs to be inserted to the new FC three times and that the SITUS_STREET_NUMBER field needs to be updated with the listed values.

Thanks in advance.

 

Jake Skinner

Dan Patterson

Attachments

Outcomes