<div dir="ltr"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div>Hello,</div><div> Currently I have a shapefile that I am joining to some non-spatial MS SQL data via the DATA parameter of my Layer as so:</div><div><br></div><div> CONNECTIONTYPE OGR</div><div> CONNECTION "C:/PATH/TO/MY /SHAPEFILE.shp"</div><div> DATA "SELECT shapefile.*, postgistable.commonid, postgistable.field2, postgistable.field3, postgistable.field4 FROM shapefile LEFT JOIN 'MSSQL:server=SQLServer\instancename;database=mydbase;UID=myuid;PWD=mypw;Tables=postgistable'.postgistable ON shapefile.commonid = postgistable.commonid"</div><div><br></div><div> This works great but we want to move the data shapefile data into postgresql. I’ve tried adapting the above by replacing the parts referencing the shapefile to a standard PostGIS connection but that results in an error. I can successfully add the non-spatial MS SQL data to the layer via a JOIN, but I’m using the MS SQL data as the label for the layer and this doesn’t work with the Join.</div><div><br></div><div> Is anyone else doing something similar or have any thoughts on how I could do this differently? </div><div><br></div><div>Thanks in advance for any help,</div><div> </div><div>Kenneth Heer</div><div><br></div><div><br></div></div></div></div>
</div>