HOW TO
An Oracle OLE DB table that has a NUMBER (9) PRIMARY KEY or a NUMBER(9)UNIQUE NOT NULL column can support selections in ArcGIS.If the OLE DB table does not have a suitable field and users wish to enable Select by Attribute or relate the table to other data sources, add a new field as outlined below.
Code:
ALTER TABLE MyData ADD (theIDCol NUMBER(9));
Code:
CREATE SEQUENCE MyGen START WITH 1;
Note:
This requires the CREATE SEQUENCE system privilege.
Code:
UPDATE MyData SET theIDCol = MyGen.NEXTVAL;
Code:
ALTER TABLE MyData MODIFY (theIDCol NOT NULL);
Code:
CREATE UNIQUE INDEX MyDataIDX ON MyData (theIDCol);
Code:
ALTER TABLE MyData ADD CONSTRAINT theIDCol_PK PRIMARY KEY(theIDCOL));
Article ID:000007168
Get help from ArcGIS experts
Download the Esri Support App