[mapserver-users] SQL join question
Jim Hagedorn
jhagedorn at bannerbkgs.com
Tue Dec 30 13:15:41 PST 2008
I am using OGR in my map file and have a CONNECTION and DATA lines. I have a SQL statement in the DATA. It works when I use it on the ACCESS database that is the Personal GeoDatabase in ESRI but when I put it into the map file I get an error message. It should bring back 33 records and the message says that the search brought back no results. I'm using a left join, which is in the example for OGR and geodatabases but the only join I can make work is an inner join and that doesn't bring back the correct results like the left join does.
This is the sql that atleast brings back some results, all be it not the results I am expecting:
SELECT *
FROM CEMSHEET_2 INNER JOIN milbank_cemetary_UTM ON CEMSHEET_2.LOT=milbank_cemetary_UTM.lot
And this one brings back the expected results in access but gives me the no results returned in GeoMoose when I run a search.
SELECT CEMSHEET_2.NAME, CEMSHEET_2.LOT, CEMSHEET_2.AGE
FROM CEMSHEET_2 LEFT JOIN milbank_cemetary_UTM ON CEMSHEET_2.LOT = milbank_cemetary_UTM.lot
>From what I have read in the documentation on mapserver, that the left join is the only join that is suppost to work but I get results when I use inner join.
Hope this makes sense.
thansk
Jim Hagedorn
GIS Specialist
[cid:image001.gif at 01C96A91.137D49F0]
Banner Associates, Inc.
409 22nd Avenue South * PO Box 298 * Brookings, South Dakota 57006
(605) 692-6342 * Fax (605) 692-5714
www.bannerassociates.com<http://www.bannerassociates.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081230/2bad1853/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 952 bytes
Desc: image001.gif
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081230/2bad1853/attachment.gif>
More information about the MapServer-users
mailing list