Select to view content in your preferred language

How to connect to a MS SQL Server query result

829
1
05-16-2011 07:42 AM
Junior_
New Contributor
Dear All,

I've a table in MS SQL Server that I'm going to use in a join with a shapefile. To realize this join, I have to combine two columns of this table and doing this at MS SQL Server is much more easier.

(Expression used at MS SQL Server):
SELECT [Column 01] + '/' + [Column 02]
FROM [Database].[dbo].[tb_table]


So, I would like to connect the ArcGIS server with this MS SQL query result to execute the join. Is it possible? How? I would like to avoid the creation of a view in MS SQL Server.

It would be solved if ArcGIS could accept commands like the one described above.

Additional information:
I've already connected the MS SQL Server database to ArcGIS using the ArcCatalog (Add OLE DB Connection -> Microsoft OLE DB Provider for SQL Server) and I use the ArcGIS 9.3.1 SP2 version.

Thanks!
0 Kudos
1 Reply
Junior_
New Contributor
Dear All,

I've found the solution using the model builder. After separate from the SQL table the data of interest, I've added a new field to allocate the concatenation results. Then, using the tool "Calculate Field", I used the expression [Column1] + "/" + [Column2], and the Add Join Tool worked properly! :cool:
0 Kudos