| Bug-ID-Nummer |
BUG-000120448 |
| Eingereicht | February 28, 2019 |
| Zuletzt geändert | June 5, 2024 |
| Gilt für | ArcGIS for Desktop |
| Gefunden in Version | 10.2.1 |
| Betriebssystem | Windows OS |
| Betriebssystemversion | 2008 R2 64 Bit |
| Status | Will Not Be Addressed
Das Entwicklungsteam hat das Problem bzw. die Anforderung sorgfältig geprüft und ist zu dem Schluss gekommen, es nicht zu beheben bzw. keine weiteren Schritte zu unternehmen. Weitere Erläuterungen finden Sie ggf. im Abschnitt "Zusätzliche Informationen" des jeweiligen Problems.
|
Zusätzliche Informationen
The ability to use AS keyword in the SubFields property of a QueryDef is documented as an invalid pattern and is not supported.
https://enterprise.arcgis.com/en/sdk/latest/windows/IQueryName_QueryDef.html
"//Invalid sub fields
//queryDef.SubFields = "max(Parcel.Area) as Max_Area";"
and
"IQueryDef::Subfields - This must be a comma delimited list of field names or a * to indicate all columns. Column aliases and functions are invalid."
Workaround
Use an alias for IQueryDef.Subfields instead of the original attribute field name. See below for an example (SDE.DynamicProtectiveDevice is replaced with the alias "A")Instead of doing this:
queryDef.SubFields = "SDE.DynamicProtectiveDevice.FEEDERID AS FEEDERID"quesryDef.Tables = "SDE.DynamicProtectiveDevice JOIN SDE.CircuitSource ON SDE.DynamicProtectiveDevice.OBJECTID = SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID";queryDef.whereClause = "SDE.DynamicProtectiveDevice.ANCILLARYROLE = 1 AND SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID IS NOT NULL";
Do this:
queryDef.SubFields = "A.FEEDERID AS FEEDERID"quesryDef.Tables = "SDE.DynamicProtectiveDevice AS A JOIN SDE.CircuitSource ON SDE.DynamicProtectiveDevice.OBJECTID = SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID";queryDef.whereClause = "A.ANCILLARYROLE = 1 AND SDE.CircuitSource.DYNAMICPROTECTIVEDEVOBJECTID IS NOT NULL";
The above modified query works fine on Oracle 11g and Oracle 12c Release 1.
Schritte zur Reproduzierung