I am trying to make a fetch using a stored procedure via EO Modeler and
would like some insight please. I add the fetch to a table object and
in the fetch interface select the 'SQL' tab. Under this tab I click
the 'Use Stored Procedures' toggle and see all SPROCs. I try to select
the one I want but no luck. How do I select the SPROC I want to use
from the list? From there I'll try to use in in the D2WS app.
I know that many (most) of you don't like the idea of sprocs but I
don't know of a better way to get the functionality I need into my D2WS
project. In case anyone is willing to suggest another way to get the
needed functionality to a WSDL, here is what the sproc from MySQL 5.1
looks like:
PARAMETER: TargetZip
BEGIN
SET @targetLng = (Select longitude from vw_ZCUG where zip= TargetZip);
SET @targetLat = (Select latitude from vw_ZCUG where zip= TargetZip );
SELECT vw_DealerLongLat.*, ROUND(ACOS(SIN(vw_DealerLongLat.latitude *
0.017453293) * SIN(@targetLat * 0.017453293) +
COS(vw_DealerLongLat.latitude * 0.017453293) * COS(@targetLat *
0.017453293) * COS(@targetLng * 0.017453293 -
vw_DealerLongLat.longitude * 0.017453293)) * 3956, 1) AS distance
FROM vw_DealerLongLat
WHERE Active_Flag = 1
ORDER BY distance ASC
LIMIT 10;
END
Essentially it shows "dealers" from nearest to furthest (based on a
postal code) and includes the mile distance. Works well as a Query in
MySQL. I tried raw SQL also but it didn't work the way I was doing
it. I need this to be a webservice so a client can input a postal and
get the array returned.
Thanks for any insight and help.
--Mat
________________________________________________________________________
AOL now offers free email to everyone. Find out more about what's free
from AOL at AOL.com.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]