tpcolson

SQL View displays, but no attribute table/can't publish in ArcGIS Server

Discussion created by tpcolson Champion on Feb 4, 2014
Latest reply on Feb 4, 2014 by mboeringa2010
Using ArcMap 10.1 SP1, SQL 2008 R2, ArcGIS Server 10.1 SP1.

The following view works perfectly in SQL:

SELECT       
CRGIS.dbo.CR_LINK.INSPEC_REQ AS 'Inspection Required',  
CRGIS.dbo.CR_LINK.INSPEC_DATE AS 'Date Inspected',  
CRGIS.dbo.CR_LINK.CR_ID AS 'CR Link TBL ID',  
CRGIS.dbo.CR_LINK.GlobalID AS 'CR Link GLB ID',  
CRGIS.dbo.CR_LINK.LCS_ID AS 'CR Link TBL LCS ID',  
CRGIS.dbo.CR_LINK.ASMIS_ID AS 'CR Link ASMIS ID',  
CRGIS.dbo.CR_LINK.FMSS_ID AS 'CR Link FMSS ID',  
CRGIS.dbo.CRSITE_PT.SURVEY_ID AS 'CR Point Survey ID',  
CRGIS.dbo.CRSITE_PT.GlobalID AS 'CR Point GLB ID',  
CRGIS.dbo.CRSITE_PT.RESNAME AS 'Resource Name',  
CRGIS.dbo.CRSITE_PT.X_Coord AS 'X Coordinate',  
CRGIS.dbo.CRSITE_PT.Y_Coord AS 'Y Coordinate',  
CRGIS.dbo.CRSITE_PT.LAT AS 'Latitude',  
CRGIS.dbo.CRSITE_PT.LON AS 'Longitude', 
CRGIS.dbo.CRSITE_PT.OBJECTID,
CRGIS.dbo.CRSITE_PT.SHAPE FROM         
CRGIS.dbo.CR_LINK 
RIGHT JOIN                       
CRGIS.dbo.CRSITE_PT ON CRGIS.dbo.CR_LINK.CR_ID = CRGIS.dbo.CRSITE_PT.CR_ID                                              
where 
CRGIS.dbo.CR_LINK.ASMIS_ID is NOT NULL                       
and 
CRGIS.dbo.CR_LINK.INSPEC_REQ ='Yes'                       
and 
CRGIS.dbo.CR_LINK.INSPEC_DATE is NULL


However, when using the "Make Query Layer" tool in ArcMap, the points show up in the map, but no attributes (regardless of what I choose for a primary key/index. Same error when using ArcToolbox "Create View" tool.

CRGIS.dbo.CRSITE_PT is a versioned, SQL_Geometry feature class that has no problems and has been working in SDE for over a year now.

We have a requirement to publish, as a map service, the feature class/related table data as a stand-alone application.

Outcomes