ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Example: Creating a spatial view in Informix using SQL

  • Create a view with a spatial column
  • Grant privileges on the spatial view
Complexity:
Beginner
Data Requirement:
Use your own data

You can use SQL to create a view and include the spatial column in the view definition. You would do this so you can view the features in ArcMap. You might also create a spatial view to allow you to use a table that contains more than one spatial column; your spatial view would only include one spatial column so you can use it with ArcGIS.

In this example, a spatial view is created to join data from the employees table and the region feature class.

Create a view with a spatial column

Define the view to include the spatial column and ObjectID from the feature class along with the other attribute columns you want in the view.

The owner of the employees table and region feature class is the gdb user; therefore, the user already has the necessary privileges to create the view.

Tip:

To create a view, the user must have at least select privileges on each table or feature class included in the view.

CREATE VIEW emp_region_view
 AS SELECT (e.emp_name,e.emp_id,r.rname,r.reg_id,r.region) 
 FROM employees e,region r 
 WHERE e.emp_id = r.emp_id;

The reg_id is the not null, integer ObjectID column from the region feature class. Region is the spatial column from the region feature class. The tables are joined based on the emp_id column.

Grant privileges on the spatial view

Now that the view exists, grant select privileges to dispatch_mgr.

GRANT SELECT 
 ON emp_region_view 
 TO USER dispatch_mgr;

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal