Hello,
I´m also trying to create a view with a data table from a linked server.
Unfortunately it doesn´t work.
What idid:
1. creating a view using this statement:
sdetable -o create_view -T WPB_2 -t WPB_join -c "*" -i sde:sqlserver:ARCGIS2010 -u sde -p Password -D GeoDB
2. I tried to modify the view in sql server management studio using the same syntax as i used for a different view I created before:
SELECT wpb.Element, wpb.Name, wpb.Totaal_debiet,wpb.Gemiddelde_druk, wpb.Totaal_opslag, wpb.Status,sde.WPB_join.Status AS Expr1, sde.WPB_join.LOCATIE, sde.WPB_join.PLAATS_, sde.WPB_join.Shape, sde.WPB_join.ADRES, sde.WPB_join.OBJECTID
FROM [PI_AF_LINKEDSERVER.BrabantWater].DataT.Snapshot_WaterProductieBedrijven AS wpb INNER JOIN
sde.WPB_join ON wpb.Name = sde.WPB_join.ARC_Address
EDIT:
This works now and is my preffered approach too, BUT is not much faster then joining the data in ArcMap via joins and relates. It´s just a little more convinient to have the feature class as a whole in the sde with all the columns you want.
Also make sure you use non versioned tables as underlying tables.
But still if I want to create the view with sdetable tools could someone give me their syntax for creating views with data in a linked database?
EDIT:
The second approach is that I created a join in SQL Server Management Studio and then tried to register it. Prerequisite for the view is that it is schema bound otherwise the index cannot be build. When I now want to create this view and click on "bind to Schema" in SQL Management Studio I get an error message: Remote access is not allowed from within a schema-bound object.
How can I now create a view which can be registered with SDE and joines data from a Linked Server???
Thanks!