Hi all
I want to add two tables in geodatabase view (see attached). Those two table can not be related (attributes tables)
I am struggling with the SQL statement
Thanks
Without a join? Something like this in SQL maybe?
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[v_gis_view_test]') and OBJECTPROPERTY(id, N'IsView') = 1) drop view [dbo].[v_gis_view_test] GO ---------------------------------------------------------------------------------------------------------------- /* COMMENTS... */ ---------------------------------------------------------------------------------------------------------------- CREATE VIEW dbo.v_gis_view_test AS SELECT table1.f1, table1.f2, table1.f3 FROM dbo.theTableOne table1 UNION SELECT table2.f1, table2.f2, table2.f3 FROM dbo.theTableTwo table2 GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
In ArcGIS, I believe you would just add the view name, "v_gis_view_test" in this case, in the name box, and the select clauses in the expression box. Is this what you're looking to do?
Thanks
I tried in arcCatalog with New/View with the following code:
SELECT
gkmigeodatabase.NCR.AB_WetlandsGrid_25km.OBJECTID,
gkmigeodatabase.NCR.AB_WetlandsGrid_25km.PageName,
gkmigeodatabase.NCR.AB_WetlandsGrid_25km.percentage
FROM
gkmigeodatabase.NCR.AB_WetlandsGrid_25km
UNION
SELECT
gkmigeodatabase.NCR.BC_WetlandsGrid_25km.OBJECTID,
gkmigeodatabase.NCR.BC_WetlandsGrid_25km.PageName,
gkmigeodatabase.NCR.BC_WetlandsGrid_25km.percentage
FROM
gkmigeodatabase.NCR.BC_WetlandsGrid_25km
The problem is that no geometry is loaded
After, I right click on my view to load data:
unfortunately, I got this error
I want notace that my feature classes have exactly the same schema
thanks for your help