AnsweredAssumed Answered

How can I alias a field and set to NULL when creating a Query Layer?

Question asked by PSLarkin_SpokaneCounty on Apr 24, 2019
Latest reply on Apr 25, 2019 by PSLarkin_SpokaneCounty

I'd like to do this, which is perfectly acceptable in SSMS:


SELECT A, B, NULL AS 'C', Shape FROM database.dbo.PARCELS WHERE PID_NUM IN ( 'someCriteria')


When I pass this query to MakeQueryLayer_Management it will create the object but no records are returned. If i drop " NULL AS 'C' " the Query Layer will be populated with rows. I am 100% confident my query returns records.


What is the proper syntax in ESRI's implementation of SQL to populate an aliased field with NULL?