|
So far I have been able to retrieve the city and state, given a ZIP code:
With CityState as (
SELECT * FROM json_table(SYSTOOLS.HTTPGETCLOB(
SYSTOOLS.HTTPGETCLOB(
'http://ziptasticapi.com/07014', ''),
'$' columns("country" VARCHAR(10),
"city" VARCHAR(30),
"state" VARCHAR(2))) x )
SELECT "city", "state" FROM CityState
In actuality I'm building the statement dynamically, in order to have the ZIP code passed to the program. Then I'm doing a FETCH USING to get the values into my program.
This site seems to offer a very straightforward solution.
1) Are there any usage restrictions with the Ziptasticapi site? I can't seem to find any on their site.
2) Does anyone have the code to do the same thing via the Google API? I tried several variations but got lost in their nesting levels. The only semi decent example I found was Oracle code. Once I started paring it down to remove the unnecessary code (for my purposes) I did not get any results returned.
TIA.
-mark
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.