cgarrettjones

simple shape copy withing same layer

Discussion created by cgarrettjones on Jun 20, 2012
Latest reply on Jun 22, 2012 by cgarrettjones
sorry for the simple question but i'd like to confirm that i'm on the right track.

i need to copy simple shapes within a layer using sql in oracle where the geo data type is st_geometry.

i believe that i can simply copy the rows without the objectid and have the objectid populated thus:

    select registration_id into v_registration_id from sde.table_registry
      where table_name = 'TA_INTEREST_PARCEL_SHAPES'
      and owner = sys_context('userenv', 'current_schema');

    select sde.version_user_ddl.next_row_id(sys_context('userenv', 'current_schema'), v_registration_id) into :new.objectid from dual;

please let me know if i've missed something. i don't see any specific sql functions for copying a shape so imagine its just that simple.

Outcomes