Hi There,
I am trying to create a Database View from a table that contains data extracted from our utility billing software with latitude and longitude coordinates for each account. I'm very new to this and I'm relying on an example view I found in an ESRI Community posting here which I've modified by adding a "Select" statement to try to make it include a some of attribute data from the table (ServiceLocation, CurrentAccount etc.).
The view works in to extent that the locations are plotting correctly based on the lat/long coordinates, but when I attempt to view the attribute table I get a "Failed to retrieve a page of rows" error.
CREATE VIEW VIPCustomerPointsView
AS
SELECT ServiceLocation, CurrentAccount, ServiceLocationOid, AccountNumber, AccountOid, StartDate, LocationId, GISId, ServiceLatitude, ServiceLongitude, ServiceStreetNumber, ServiceStreetName, ServiceStreetSuffix, ServiceCity, ServiceZipcode
geography::Point(CASE ISNULL(ServiceLatitude,0)
WHEN 0 THEN '37.809737'
ELSE ServiceLatitude END,
CASE ISNULL(ServiceLongitude,0)
WHEN 0 THEN '-85.509352'
ELSE ServiceLongitude END
, 4326) AS GeomPoint
FROM DBO.dbo_IdsForGISFinalCable1
I'm guessing that I've used the wrong syntax with my select statement or missed something somewhere and that's preventing the View from fetching all the attribute data. If anyone can help by showing me the correct script I should use you all have my sincere appreciation.
Thanks!!