How to delete records that are based on a join programmatically using MapBasic or within MapInfo Pro

UPDATED: August 28, 2017

MapInfo will not allow the Delete statement to operate on a table which is formed by a join, as this scenario would allow ambiguity around which base table to delete records from.
However, the Delete statement will work on tables which are SQL derivatives of a single table. The following SQL shows how you can build a delete query that doesn't join to a second table, but does compare values with one:
Select * from Properties
Where PROPERTY_REF = Any (Select Property_Reference from meterpoints)
Into Removed
Delete from Removed

Environment Details

Products affected: MapInfo Pro™


  • No Downloads