By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,842 Members | 2,368 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,842 IT Pros & Developers. It's quick & easy.

How do I use pass data to/from stored procedure

P: n/a
Hello,
I read an article on how to use Yahoos API to GeoCode addresses. Based
on the article I created a stored procedure that is used as follows:
SPGeocode '2121 15st north' ,'arlington' ,'va' ,'warehouse-test'
Returns:
Latitude Longitude GeoCodedCity GeoCodedState GeoCodedCountry
Precision Warning
----------- ---------- ------------- ------------- ---------------
--------------- --------
38.889538 -77.08461 ARLINGTON VA US
Precision Good No Error

It returns Latitude and Longitude and other information. Works great.
In conjunction with Haversine formula, I can compute the distance
between two locations if I know the Lat and Long of the two points.
This can start to answer questions like "How many students do we have
within a 10 mile radius of Location X?"
(Marketing should go nuts over this :)

My question is how can i use my data from a table and pass it to the
SPGeocode via a select statement?
The table I would use is:

CREATE TABLE "dbo"."D_BI_Student"
(
"STUDENT_ADDRESS1" VARCHAR(50) NULL,
"STUDENT_ADDRESS2" VARCHAR(50) NULL,
"STUDENT_CITY" VARCHAR(50) NULL,
"STUDENT_STATE" VARCHAR(10) NULL,
"STUDENT_ZIP" VARCHAR(10) NULL
)
;
This is so new to me, I am not even sure what to search.
TIA
Rob

May 2 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.