<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Flavio,<br><br>Column names are case sensitive, have you checked this ?<br><br>Cheers from México<br><br><div style="font-weight: bold; color: rgb(0, 96, 191);">IC Carlos Ruiz</div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br style="font-weight: bold; color: rgb(0, 96, 191);"><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> flaviocarmo &lt;flavio.o.carmo@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> mapserver-users@lists.osgeo.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, November 29, 2010 8:43:44 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [mapserver-users] Join from SHP file to PostgreSQL
 table<br></font><br>
<br>Hi,<br><br>I need to make a layer with a join between a shapefile and a non-spatial<br>table, stored on PostgreSQL. I've found this documentation<br><span>(<a target="_blank" href="http://mapserver.org/mapfile/join.html">http://mapserver.org/mapfile/join.html</a>) but i could make it work, so, can u</span><br>guys help me looking at this configuration and tell me whats wrong?<br><br>LAYER<br>&nbsp; &nbsp; &nbsp; &nbsp;  NAME "join_shape"<br>&nbsp; &nbsp; &nbsp; &nbsp;  TYPE POLYGON<br>&nbsp; &nbsp; &nbsp; &nbsp;  STATUS DEFAULT<br>&nbsp; &nbsp; &nbsp; &nbsp;  DATA "join_shapefile.shp"<br>&nbsp; &nbsp; &nbsp; &nbsp;  CLASS<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  NAME "Joined Shapes"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  STYLE<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  OUTLINECOLOR 120 120 120<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  COLOR 0 30 255<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp;  END<br>&nbsp; &nbsp; &nbsp; &nbsp;  END<br>&nbsp; &nbsp; &nbsp; &nbsp;  TOLERANCE 20<br>&nbsp; &nbsp; &nbsp; &nbsp;  JOIN<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  NAME "teste"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  CONNECTION "dbname='testdb' host=GSERVER1 port=5432<br>user='test'<br>password='test' sslmode=disable"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  CONNECTIONTYPE ogr<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  TABLE '"test"."nonspatial"'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  FROM "code"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  TO "code"<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  TYPE ONE-TO-ONE<br>&nbsp; &nbsp; &nbsp; &nbsp;  END<br>&nbsp; &nbsp; &nbsp;  END # layer<br><br>In this layer, i want to show only the geometrys in the shapefile<br>"join_shapefile.shp" that have a CODE column that is the same the CODE<br>column in the test.nonspatial
 table, stored on Postgre.<br><br>That is possible?<br><br>Thanks again<br><br>Regards,<br><br>Flavio Carmo<br>-- <br><span>View this message in context: <a target="_blank" href="http://osgeo-org.1803224.n2.nabble.com/Join-from-SHP-file-to-PostgreSQL-table-tp5784531p5784531.html">http://osgeo-org.1803224.n2.nabble.com/Join-from-SHP-file-to-PostgreSQL-table-tp5784531p5784531.html</a></span><br>Sent from the Mapserver - User mailing list archive at <a target="_blank" href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><span><a target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span><br></div></div>
</div><br>

      </body></html>