You need to use a LEFT OUTER JOIN, like so (although I am only doing the simple case of joining "edges" and "addr", but you can probably extend it to your full case):
SELECT a.tlid, c.fromhn, c.tohn, c.side, c.zip, c.plus4, a.statefp, a.countyfp FROM edges a LEFT OUTER JOIN addr AS c ON (a.tlid=c.tlid ) Robert W. Burgholzer Surface Water Modeler Office of Water Supply and Planning Virginia Department of Environmental Quality [EMAIL PROTECTED] 804-698-4405 Open Source Modeling Tools: http://sourceforge.net/projects/npsource/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Woodbridge Sent: Monday, June 30, 2008 12:17 PM To: PostGIS Users Discussion Subject: [postgis-users] OT: Help with a join Hi all, I could use a little help with a join: select a.tlid, b.fullname, b.paflag, a.mtfcc, c.fromhn, c.tohn, c.side, c.zip, c.plus4, a.statefp, a.countyfp from featnames b, addr c, addrfn d, edges a where a.tlid=b.tlid and b.tlid=c.tlid and b.linearid=d.linearid and c.arid=d.arid and a.roadflg='Y' order by a.tlid, b.fullname, c.side ; I need to get back records for every record in edges even if there is no matching tlid in the addr table. How do I do that? Thanks, -Steve _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users