[mapserver-users] non spatial MSSQL data in a Layer JOIN
KenHeer1
kenheer1 at gmail.com
Thu Jan 9 08:07:58 PST 2014
Again thanks for all the help. We're on the same page, what I have in my
mapfile definition is:
CONNECTIONTYPE OGR
CONNECTION "C:/Path/to/shapefile.shp"
DATA "SELECT shapefile.*, tablename.* FROM shapefile LEFT JOIN
'MSSQL:server=server\instance;database=dbname;UID=userid;PWD=password;'.tablename
ON shapefile.fieldkey = tablename.fieldkey"
and running ogrinfo I have:
ogrinfo -sql "select shapefile.*, tablename.* from shapefile left join
'MSSQL:server=server\instance;database=dbname;UID=userid;PWD=password;'.tablename
ON shapefile.fieldkey = tablename.fieldkey" C:/Path/to/shapefile.shp
When I try either I get an error saying my table doesn't exist. The specific
error I get is "SELECT from table zone failed, no such table/featureclass"
(zone being the table I'm trying to get to).
Using ogrinfo, I've tried the connection to the shapefile by itself and it
works, and I've tried the connection to the OGR database and it works. I can
query out of each of them fine, but when I attempt the join it says the
table (that I was just able to query) doesn't exist.
Thanks
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/non-spatial-MSSQL-data-in-a-Layer-JOIN-tp5096980p5097172.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list