How do you create and use a SQL Server spatial view in ArcMap?

Response from the ArcGIS forum post:

"the problem is that your view does not have something ArcMap recognizes as an ObjectID field. ArcMap must have a field that it can use as a unique identifier. It is a little tricky to generate a field using something like a RowID in SQL Server when you are aggregating a single column, but you can do something inelegant like this:

SELECT 1 as ObjectID, GEOMETRY::UnionAggregate(shape) FROM CENSUS_TRACTS_2010_2877 WHERE PCT_ASIAN > 5

This will obviously only work in this case when your view is resulting in a single record.

-Shannon "

http://forums.arcgis.com/threads/87428-Spatial-views-from-SQL-Server-2012?p=309422&posted=1#post309422

UPDATE:

The best way to give ArcMap the ability to use a spatial view is to use a ROW_NUMBER() function to generate OBJECTID's on the features returned in the view.

A good thread that describes this process can be found here:

How to set up an ArcMap Relate with a table from MS SQL Server 2012