I'm trying to use it as a SQL query as SDO_GEOM.SDO_CLOSEST_POINTS pure. In all instances it is used in combination with PL / SKL. Is it possible to use it in a query without PL / SQL and can someone provide an example of such syntax how to do it?
My special task is at the best one point on top one at the top.
Thanks. It is not possible to call the PL / SQL process from a SQL query.
I suggest that you have an Oracle object types that outside
parameters SDO_GEOM.SDO_CLOSEST_POINTS
from wraps to make and then your own PL / SQL function Define that process that gives an example of its object type call
like this:. Create the closest_points_type object (district number, geoma mdsys.sdo_geometry, geomb mdsys form.sdo_geometry) / function create sdo_closest_points_sql (sdo_geometry in p_geom1, sdo_geometry in p_geom2, number p_tolerance, in VARCHAR2 P_unit) returns the closest_points_type l_dist number; L_geoma mdsys.sdo_geometry; L_geomb mdsys.sdo_geometry; sdo_geom.sdo_closest_points start (geom1 = & gt; p_geom1, geom2 = & gt; p_geom2, tolerance = & gt; p_tolerance, unit = & gt; p_unit, district = & gt; l_dist, geoma = & gt; l_geoma, geomb = & Gt; l_geomb); Return closest_point_type (l_dist, l_geoma, l_geomb); END sdo_closest_points_sql; /
You should then be able to call this function from a SELECT
statement, and inquire such a thing:
select (sdo_closest_points_sql (mdsys.sdo_geometry (2002 as Q1, zero, zero, sdo_elem_info_array (1,2,1), sdo_ordinate_array (1,1, 1,10, 1,20)), mdsys .sdo_geometry (2002, with zero, select zero, sdo_elem_info_array (1,2,1), sdo_ordinate_array (2,5, 2,15, 2,25)), 0.05, nil) arising from dual) (q1 .result) .dist district, (q1.result). Geoma geoma, (q1.result). GOM GOM F1 to
Comments
Post a Comment