Enable Openquery for SQL views in Geodatabases

Idea created by jtimm on Jun 15, 2018
    • deleted-user-7Sz0YcW_So3q
    • claire.inbody
    • otejumola
    • PSLarkin_SpokaneCounty
    • jtimm
    • keamarie
    • casey.dunn@Nebraska.gov_nebraska
    • John.Watermolen@Nebraska.gov_nebraska

    If I want to run a SQL query to create a view from another database on another server I create a linked server.  I then can query non spatial data and join into my geodatabase.

    The problem lies in that a standard query cannot bring CLR data type across the linked server connection.  In order to do that you need to use something along the lines of this.


    Create view [cio].[vw_Dataset]
    SELECT *

    FROM OPENQUERY([gpcsqlc1], 'SELECT



    Openquery apparently isn't supported in geodatabases.  This query works fine in SQL Management Studio but breaks when it is registered with the geodatabase.

    query result