I am building a spatial view using SQL Server Management Studio 2014. One of the tables I am using to build this view has field names that are not compatible with esri; the field names have slashes, hyphens and spaces.
Is it possible to rename the fields of the view being created as the view is being created? So something like;
CREATE VIEW dbo.NewView ASSELECT * FROMdbo.tableAINNER JOIN dbo.tablebON dbo.tableA.UID=dbo.tableB.UIDEXEC sp_rename 'dbo.NewView.Bad/field-name','GOOD_FIELD_NAME'The EXEC sp_rename works if I run it by itself after the view has been created and on one field at a time, which isn't an ideal solution.
Or is there some way to run a find/replace on the field names of the view after it has been created?
أكثر...
Is it possible to rename the fields of the view being created as the view is being created? So something like;
CREATE VIEW dbo.NewView ASSELECT * FROMdbo.tableAINNER JOIN dbo.tablebON dbo.tableA.UID=dbo.tableB.UIDEXEC sp_rename 'dbo.NewView.Bad/field-name','GOOD_FIELD_NAME'The EXEC sp_rename works if I run it by itself after the view has been created and on one field at a time, which isn't an ideal solution.
Or is there some way to run a find/replace on the field names of the view after it has been created?
أكثر...