Dear List
 
The Help on Select SQL is fairly scratchy but does state that it's based
on GP SQL.  It doesn't give any examples of accessing more than 2
tables.
 
Now then, I have a table with foreign key references to at least two
other tables.  e.g. The Stops table bears a foreign ref, ZoneNo, to the
zone in which it resides, and one to its county, and one referring to
the Zone Group that comprises its catchment area.
 
I'm creating a bespoke "info tool" whereby I can display all the info
pertaining to the facility, but I want to get the full info from the
referenced tables, e.g.
 
select * from facmast, facdesc, buszoner 
  where facmast.fac_code = FacDesc.fac_code 
  and   facmast.zone     = buszoner.zonenumber

Issuing the above select I get the error messgage:

"Incorrect tables are joined.  Invalid join condition in where clause."

But this is just bog-standard SQL, which I've used extensively in other
languages.  I've tried different permutations, and "Select ... Where
.... And ... In ( Select ....)" all to no avail.

I've come to the conclusion that, despite how the Help command syntax
suggests, you can't select from more than 2 tables except maybe when
you're selecting from the other tables on the same key.

Any advise?

'ppreciate it.

Terry McDonnell

 

_______________________________________________
Mapinfo-l mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to