Can't select on a spatial view

448
6
01-23-2021 04:50 AM
MichaelGinzburg
New Contributor III

Hello,

I can't select on a spatial view.

Queryfunctionality always returns empty DataTable.

I can't select in ArcGIS Desktop but not in ArcGIS Server.

ArcGIS Server 9.3.1

ArcSDE 9.3.1

Thanks!

0 Kudos
6 Replies
Bud
by
New Contributor III

Is the view registered with the geodatabase?

Can you tell us about the unique ID column? Is it 100% guaranteed to be unique? Is it based on a static column or is it generated/calculated?

In ArcGIS Desktop, if you open the attribute table, and navigate to the last record, are you able to select all records? (I'm just trying to get a sense of what's working and what isn't.)

I had similar issues. It happened after I made a change to the SQL of a registered view. In my case, I dropped the view and recreated it, and re-registered it. That seemed to fix my selection issues.

DanPatterson
MVP Notable Contributor

@VinceAngelo tagging here as well


... sort of retired...
0 Kudos
MichaelGinzburg
New Contributor III

The uniqueid column is objectid.

The view is not registered.

I did not alter anything, just created the view with sdetable command.

Thanks!

0 Kudos
VinceAngelo
Esri Esteemed Contributor

It's been ages since I last used 9.3.1, which has been out of support over seven years now
(it's so different from modern releases it might as well be a different product).

There isn't nearly enough information here to begin to speculate about what could be the problem. Among the details missing:

RDBMS in use (exact version)
Definitions of the tables involved in the query
The exact SQL to create the view
The exact parameters (except password) used in the sdetable commands
An indication of the cardinality of the joins
Example output
An indication of the uniqueness of the registered rowid column

Working with ancient software is a considerable risk to your organization. I recommend you migrate your data to a modern software stack (supported OS, DBMS, and application stack).

- V

MichaelGinzburg
New Contributor III

Thanks Vince,

Oracle 11g

The sdetable command:

sdetable -o create_view -T BUILDING_GVIEW ^
-t "LYR_BUILDING, BUILDING_VIEW" ^
-c "LYR_BUILDING.OBJECTID,LYR_BUILDING.SHAPE,BUILDING_VIEW.*" ^
-w "LYR_BUILDING.BUILDING_CODE=BUILDING_VIEW.BUILDING_CODE" ^

The OBJECTID column is unique for a spatial view (building_gview).

The problem seems to occur in ADF only.

The problem is that it is the test environment. In the production environment everything works.

0 Kudos
MichaelGinzburg
New Contributor III

Some update: we have found that for some reason ADF considers one of the view fields to be not nullable despite it is defined as nullable in the view and source DB table.

As a workaround we excluded the field from the query and it started to select.

I still don't know if the same configuration works ok on the production.

0 Kudos