ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data Namespace / SQLSyntax Class / QualifyColumnName Method
The name of the table. It may be null or an empty string.
The name of the column. It must not be null or an empty string.
Example

In This Topic
    QualifyColumnName Method
    In This Topic
    Given a table name and column name, returns its fully qualified name. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public string QualifyColumnName( 
       string tableName,
       string columnName
    )
    Public Function QualifyColumnName( _
       ByVal tableName As String, _
       ByVal columnName As String _
    ) As String

    Parameters

    tableName
    The name of the table. It may be null or an empty string.
    columnName
    The name of the column. It must not be null or an empty string.

    Return Value

    The fully qualified column name.
    Exceptions
    ExceptionDescription
    columnName is null or an empty string.
    A geodatabase-related exception has occurred.
    Remarks
    Applications should use the QualifyTableName and QualifyColumnName methods to construct fully qualified dataset and column names.
    Example
    Creating a QueryTable using a query which joins two versioned tables in a geodatabase
    public async Task QueryTableJoinWithVersionedData()
    {
      await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
      {
        QueryDef queryDef = new QueryDef
        {
          Tables = "CommunityAddress JOIN MunicipalBoundary on CommunityAddress.Municipality = MunicipalBoundary.Name",
          SubFields = "CommunityAddress.OBJECTID, CommunityAddress.Shape, CommunityAddress.SITEADDID, CommunityAddress.ADDRNUM, CommunityAddress.FULLNAME, CommunityAddress.FULLADDR, CommunityAddress.MUNICIPALITY, MunicipalBoundary.Name, MunicipalBoundary.MUNITYP, MunicipalBoundary.LOCALFIPS",
        };
    
        using (Geodatabase testVersion1Geodatabase = new Geodatabase(new DatabaseConnectionProperties(EnterpriseDatabaseType.Oracle)
        {
          AuthenticationMode = AuthenticationMode.DBMS,
          Instance = "instance",
          User = "user",
          Password = "password",
          Database = "database",
          Version = "user.testVersion1"
        }))
        {
          QueryTableDescription queryTableDescription = new QueryTableDescription(queryDef)
          {
            Name = "CommunityAddrJounMunicipalBoundr",
            PrimaryKeys = testVersion1Geodatabase.GetSQLSyntax().QualifyColumnName("CommunityAddress", "OBJECTID")
          };
    
          // Will be based on testVersion1.
          using (Table queryTable = testVersion1Geodatabase.OpenQueryTable(queryTableDescription))
          {
            // Use queryTable.
          }
        }
    
        using (Geodatabase testVersion2Geodatabase = new Geodatabase(new DatabaseConnectionProperties(EnterpriseDatabaseType.Oracle)
        {
          AuthenticationMode = AuthenticationMode.DBMS,
          Instance = "instance",
          User = "user",
          Password = "password",
          Database = "database",
          Version = "user.testVersion2"
        }))
        {
          QueryTableDescription queryTableDescription = new QueryTableDescription(queryDef)
          {
            Name = "CommunityAddrJounMunicipalBoundr",
            PrimaryKeys = testVersion2Geodatabase.GetSQLSyntax().QualifyColumnName("CommunityAddress", "OBJECTID")
          };
    
          // Will be based on testVersion2.
          using (Table queryTable = testVersion2Geodatabase.OpenQueryTable(queryTableDescription))
          {
            // Use queryTable.
          }
        }
      });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also