Thanks to Juanse Barros J. and Bill Donaldson for their suggestions. It appears that it is not possible to do what I wanted using an SQL statement. What I have done instead is write a small MapBasic application that uses the SelChangedHandler procedure that monitors when a selection has changed in the ZONES table and updates a query based on the ORIGDEST table. It seems to be exactly what I want. Email me if you are interested in the code... Keith ------------------------------------------------------------------------ Keith Miller Principal Planner: GIS and Modeling North Jersey Transportation Planning Authority, Inc. One Newark Center, 17th floor Newark, NJ 07102 973-639-8444 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Keith Miller Sent: Thursday, August 23, 2001 11:18 AM To: [EMAIL PROTECTED] Subject: MI-L One-to-many joining/linking two tables Greetings, I have a SQL problem that I cannot seem to figure out how to implement. I have a table of zones (call it ZONES), which has one field (called ZONE) and a table of Origin-Destination pairs (call it ORIGDEST), with two fields (ORIGZONE and DESTZONE). What I would like to do is to be able to join the two tables so that when I select a record in the ZONES table, the records with matching ORIGZONE are selected in the joined table (eventually, I want to be able to make both tables mappable, so that when I select a ZONE in the ZONES map, it selects all of the DESTZONES, but I'm starting small...). In ArcView you can do this by "linking" the two tables. Is this possible to do in MapInfo? I haven't been able to find any help in the archives, so please help me out... ------------------------------------------------------------------------ Keith Miller Principal Planner: GIS and Modeling North Jersey Transportation Planning Authority, Inc. One Newark Center, 17th floor Newark, NJ 07102 973-639-8444 [EMAIL PROTECTED] _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body. _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body.
