I am using ArcGIS for Desktop 10.2. Am I correct in understanding that ArcGIS will only let you select an integer or text fields as the "key" ID when adding a query layer? Our Oracle enterprise DB mistakenly used NUMBER(22), Data Type: FLOAT, as unique identifiers even though the IDs are all whole numbers; however, I seem unable to select the 'number' fields as keys. It will allow me to select integers and text (I guess you can combine a number with text to make a unique identifier). I've tried CAST-ing them as integers in the query but the queries are crashing ArcGIS and I'm trying to figure out whether there is any way around the CAST statement to see if that is the problem.
All ArcGIS query layers require a "unique identifier" to link features in the map canvas to table rows (this allows graphical feature selection to highlight a row in the UI, or selection of a row in the UI to highlight a map feature). The "rowid" column required for ArcSDE-registered views in enterprise geodatabases is limited to integers, but Query Layers are more forgiving -- quoting the online documentation:
To be used as a unique identifier in ArcGIS, a field must be not null, contain unique values, and be one of the following data types:
- integer (positive values only)
Real (floating-point) values cannot be used because equivalence assertions can fail due to storage representation complications.