[gdal-dev] OGR - Oracle problem
Clay, Bruce
bclay at ball.com
Fri Mar 6 15:51:36 EST 2009
When I issue the following SQL query through SqlPal I get 2 columns of
what appears to be valid data
select * from
(select OBJECTID, sdo_nn_distance(1) Dist from
GEONAMES_SDO a1 where DSG LIKE 'PPL%' AND sdo_nn(a1.shape,
sdo_geometry(2001, null, sdo_point_type(-84.48500000,-21.98100000,
NULL), null, null),
'sdo_num_res=100',1) = 'TRUE');
Results
OBJECTID Dist
451323 .397194968358102
432828 .647925639080596
447967 .239182235498376
453566 .495207228227733
454057 .270980772175814
392983 .165016165538413
407235 .325487083888139
408026 .647925639080596
399747 .647925639080596
399036 .325487083888139
409567 .165016165538413
423135 .239182235498376
If I issue the same query through OGR ExecuteSql I get the first column
(OBJECTID) as it appears in SqlPal but the second column which should be
the distance comes back as type OFTInteger and the value is always zero
reguardless of where I call GetFieldAsString or GetFieldAsDouble.
Is there something else that has to be specified to get the correct data
type on this type of a query where a column is created dynamically?
Bruce
This message and any enclosures are intended only for the addressee. Please
notify the sender by email if you are not the intended recipient. If you are
not the intended recipient, you may not use, copy, disclose, or distribute this
message or its contents or enclosures to any other person and any such actions
may be unlawful. Ball reserves the right to monitor and review all messages
and enclosures sent to or from this email address.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090306/33a6dab5/attachment-0001.html
More information about the gdal-dev
mailing list