As mentioned within the ESRI-docs we can set an Alias for the subfields of an SQL-query performed onto a file-geodatabase as follows:
IQueryDef2 filter = (IQueryDef2) featureWorkspace.CreateQueryDef();filter.SubFields = "ID, MIN(t.MyProperty) as MyProp";filter.PostfixClause = "GROUP BY ID";filter.Tables = "MyTable";This query should return in a cursor with the two fields ID and MyProp. When I try the same for my Oracle-SDE I get MIN(MyProperty) as MyProp as name for the second field. When searching for a field I therefor should have to use something similar to
cursor.FindField("MIN(MyProperty) as MyProp")which is quite annoying.
Is there a way I can set an alias for SQL-expressions (such as SUM, MIN, ...) into the resultset?
As I currently use only one single table within my query I´d also like to use a simple IQueryFilter which also has a PostfixClause to be used for OrderBy and GroupBy-statements. However I did not find any ressources for the latter which should be much easier then the mentioned appraoch using the IQueryDef. So if you have an idea about this it would be much more helpfull I guess.
أكثر...
IQueryDef2 filter = (IQueryDef2) featureWorkspace.CreateQueryDef();filter.SubFields = "ID, MIN(t.MyProperty) as MyProp";filter.PostfixClause = "GROUP BY ID";filter.Tables = "MyTable";This query should return in a cursor with the two fields ID and MyProp. When I try the same for my Oracle-SDE I get MIN(MyProperty) as MyProp as name for the second field. When searching for a field I therefor should have to use something similar to
cursor.FindField("MIN(MyProperty) as MyProp")which is quite annoying.
Is there a way I can set an alias for SQL-expressions (such as SUM, MIN, ...) into the resultset?
As I currently use only one single table within my query I´d also like to use a simple IQueryFilter which also has a PostfixClause to be used for OrderBy and GroupBy-statements. However I did not find any ressources for the latter which should be much easier then the mentioned appraoch using the IQueryDef. So if you have an idea about this it would be much more helpfull I guess.
أكثر...