HOW TO

Find fields within feature classes and tables that are of the GlobalID data type

Last Published: April 25, 2020

Summary

When working with feature classes and tables across multiple geodatabases, searching for fields of the GlobalID or GUID data type is time consuming. Hasten the process using a query. It is also important to note that the unique identifying marker for the Global ID or GUID data type is '12' in the SDE_TYPE field located in the COLUMN_REGISTRY table. Instantly identify the GlobalID or GUID fields by including a parameter in the query to search for the value '12' in the SDE_TYPE table.

Procedure

Use the following queries depending on the database type and replace the values in the queries as needed. The following queries contain examples of GUIDs. Replace the GUIDs in the queries as well.

SQL Server

SELECT A.[table_name] as 'Table Name', A.[column_name] as 'Field Name', B.[Type] as 'Feature Type'
FROM [sde].[SDE_column_registry] A, [sde].[GDB_ITEMS] B
WHERE A.SDE_TYPE = 12 AND A.database_name + '.' + A.OWNER + '.' + A.TABLE_NAME = B.physicalname AND (B.TYPE = '{70737809-852C-4A03-9E22-2CECEA5B9BFA}' OR B.TYPE = '{CD06BC3B-789D-4C51-AAFA-A467912B8965}')

Oracle

SELECT A.TABLE_NAME AS "Table Name", A.COLUMN_NAME AS "Field Name", B.TYPE AS "Feature Type"
FROM SDE.COLUMN_REGISTRY A, SDE.GDB_ITEMS B
WHERE A.SDE_TYPE = 12  AND A.OWNER || '.' || A.TABLE_NAME = B.physicalname  AND (B.TYPE = '{70737809-852C-4A03-9E22-2CECEA5B9BFA}' OR B.TYPE = '{CD06BC3B-789D-4C51-AAFA-A467912B8965}');

Article ID:000021618

Software:
  • ArcMap

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options