• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 507
  • Last Modified:

Google and TSQL XML Readings

Hello everyone,

I am currently working on getting geocoding information that may be obtained from google in xml using the following command:


Open in new window

Is there a way to execute the line in above in TSQL and get the results back as follows: (so I can save that to a table)

		<formatted_address>3595 Cadillac Ave, Costa Mesa, CA 92626, USA</formatted_address>
			<long_name>Cadillac Ave</long_name>
			<short_name>Cadillac Ave</short_name>
			<long_name>Costa Mesa</long_name>
			<short_name>Costa Mesa</short_name>
			<long_name>United States</long_name>

Open in new window

John Esraelo
John Esraelo
  • 2
1 Solution
lcohanDatabase AnalystCommented:
You could store it in a XML type data column or use XML SQL commands like FOR XML and OPENXML to read it in format you want.

lcohanDatabase AnalystCommented:
And you can run the http:// above in a SQL CLR stored proc since SQL 2005 and up - here's an example:

John EsraeloDatabase / SQL DeveloperAuthor Commented:
Hi LCohan,
I have been reading the article and it is a very interesting piece.
Currently building the visual studio c# DLL.  Although, this example is for the city, state, county, I would like to see if I can alter this and add the street address as well.  After all, that is my project.

Going to discuss this with my boss and then take it from there today.
It looks like a promising code.
Will get back to you shortly.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now