<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5335.5" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=279522405-22032006><FONT face=Arial>Hello
folks,</FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=279522405-22032006> <FONT face=Arial>Is it
possible to join a column in a shapefile's dbf to a column in an ODBC stored
procedure via OGR? I'm not too concerned about performance, so this is the
idea for the mapfile syntax:</FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial>LAYER<BR>
NAME StatesProvinces</FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial> CONNECTIONTYPE
OGR<BR> CONNECTION Nearctic.shp<BR> DATA "SELECT NAME,
SpiderData.StateProvince FROM Nearctic LEFT JOIN</FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT
face=Arial>
'<OGRVRTDataSource></FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT
face=Arial>
<OGRVRTLayer name="SpiderData"></FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT
face=Arial>
<SrcDataSource>ODBC:xxxx/xxxx@xxxx</SrcDataSource></FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT
face=Arial>
<SrcSQL>EXEC LocalityList
"%SpeciesCode%"</SrcSQL></FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT
face=Arial>
</OGRVRTLayer></FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT
face=Arial>
</OGRVRTDataSource>'.SpiderData ON NAME =
SpiderData.StateProvince"<BR> STATUS DEFAULT<BR> TYPE
POLYGON<BR> CLASSITEM "NAME"</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial>
CLASS<BR> NAME "Yukon Territory"<BR>
EXPRESSION "Yukon Territory"<BR> COLOR 210 210 210<BR>
END</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial>
CLASS<BR> NAME "Northwest Territories"<BR>
EXPRESSION "Northwest Territories"<BR> COLOR 205 92
92<BR> END</FONT></SPAN></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial>etc.</FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial>What I ultimately want to
do is shade a selection of whole States and Provinces (in a shapefile) a
colour different from those not chosen as a result of a JOIN
to an ODBC stored procedure. The single and double quotes in the DATA
rows above choke on one another, so this obviously doesn't work. Anyone have any
ideas?</FONT></SPAN></DIV>
<DIV><SPAN class=279522405-22032006><FONT face=Arial></FONT></SPAN> </DIV>
<DIV align=left><FONT face=Arial>David P. Shorthouse</FONT></DIV>
<DIV align=left><FONT
face=Arial>------------------------------------------------------</FONT></DIV>
<DIV align=left><FONT face=Arial>Department of Biological Sciences</FONT></DIV>
<DIV align=left><FONT face=Arial>CW-403, Biological Sciences Centre</FONT></DIV>
<DIV align=left><FONT face=Arial>University of Alberta</FONT></DIV>
<DIV align=left><FONT face=Arial>Edmonton, AB </FONT><FONT
face=Arial>T6G 2E9</FONT></DIV>
<DIV align=left><FONT face=Arial>Phone: 1-780-492-3080</FONT></DIV>
<DIV align=left><FONT face=Arial>mailto:<A
href="mailto:dps1@ualberta.ca">dps1@ualberta.ca</A></FONT></DIV>
<DIV align=left><FONT face=Arial><A
href="http://canadianarachnology.webhop.net/">http://canadianarachnology.webhop.net</A><BR><A
href="http://arachnidforum.webhop.net/">http://arachnidforum.webhop.net</A></FONT></DIV>
<DIV align=left><FONT
face=Arial>------------------------------------------------------</FONT></DIV>
<DIV> </DIV></BODY></HTML>