Geocoding in SQL Server - do I need C# for it?

  • I've been digging around playing with spatial maps in SQL Server.  I've read a few articles on geocoding etc, and it looks like it's done under the covers in Excel 2016+ using Bing under the covers. If I want to do it in SQL Server, do I have options besides creating an account on Bing/Google to do the geocoding?

    Yeah, I know. Welcome to 2008R2, right?

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I'm not entirely sure what you want to do here. You can do this in SQL Server (https://www.sqlservercentral.com/articles/geocode-addresses-in-t-sql), directly by using the spatial types. Or you could call the Bing (or Google) APIs to calculate things, but depending on your application, you might choose one over the other.

     

  • Thanks Steve. Just wanted to geocode a bunch of addresses in my database.

  • Okay, I feel stupid. I'm thinking I should be able to do this using a CTE and and update query. Would I have to convert this to a table-valued function and return the table of results that way? Or does this method geocode a single address at a time, so I'd have to loop through my addresses with a cursor? <shudder>

  • Hello

    Read the book: "Pro Spatial with SQL Server 2012"

    https://www.apress.com/gp/book/9781430234913

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply