I have created a database view in Oracle and I would like to use the view with ArcGIS SDK for .NET via ArcGIS Server.
I've successfully published the view on the ArcGIS Server using the ESRI's trick to first to publish a service with a geometry and then modify the service and manually add the view to it.
I can query the data on the ArcGIS Server (web browser) with select *, but if I try to use ObjectID as a filter I get an error "Unable to perform query operation." (which isn't very descriptive).
Now I know this error is caused by the fact that the view isn't registered with the SDE, and so the ArcGIS server doesn't know what the "objectid" column is (even though the view has a column named objectId).
I've read the ESRI documentation about registering a view to SDE (ArcGIS Server for the Java Platform 9.3 Help), but the documentation I've found only covers the most basic scenario: select * from table or a simple join. As far as I know, the registration should be done with sdetable.exe with parameters that tell which tables are present in the view and which columns to select from them.
My view however contains many subqueries and aggregated values (like SELECT CASE ... AS columnName), which simply cannot be used on the command line because it requires the table name to be specified (the -c parameter). The documentation I've found is quite old, se maybe things have improved over time.
So my question is: is there any way to release an ArcGIS Server service from a very complex Oracle database view and register it to SDE?