rninkewats

Bulk insert into MS SQL Creating ObjectID's

Discussion created by rninkewats on Apr 21, 2014
Latest reply on Apr 22, 2014 by rninkewats
I am running an ETL from a spatial view into publication database. The view has results in duplicate ObjectID's. I started working with the get_ids SP example from ESRI, but that seems to be built more for a single record insert and not a bulk insert. I have also tried the NEXT_ROWID. Here is my example...

DECLARE @id as integer
DECLARE @num_ids as integer
EXEC L.i16_get_ids 2, 1, @id output, @num_ids output;

INSERT INTO L.TAXPARCELWCONDOS ([OBJECTID]
           ,[PARCELNO]
           ,[SHAPE])
SELECT @id
      ,[PARCELNO] ,[shape]
  FROM [Parcel].[L].[view_TaxParcelwCondos];
END
How can I generate new ObjectID's for the insert.

Thanks,

Outcomes