Hi,
I have a query to find overlaps between two tables of polygons and put the area of overlap in a column, this query works fine in the mapbasic window but when run in a mapbasic program the returned overlapping areas are all weird numbers.
My query
Select tblProperty.Lot_Plan "P_Lot_Plan", tblProperty.Tenure "P_Tenure", tblProperty.P_ID, sum(AreaOverlap(tblLeases.obj, tblProperty.obj))"Overlap_m2" from tblProperty, tblLeases where tblLeases.obj intersects tblProperty.obj and area ( overlap ( tblProperty.OBJ , tblLeases.obj ) , "sq m" ) > 5 group by tblProperty.P_ID into PropertyOverlap
I also tried using the run command, which didn't work
Dim strcmd as string
strcmd = "Select tblProperty.Lot_Plan ""P_Lot_Plan"", tblProperty.Tenure ""P_Tenure"", tblProperty.P_ID, sum(AreaOverlap(tblLeases.obj, tblProperty.obj))""Overlap_m2"" from tblProperty, tblLeases where tblLeases.obj intersects tblProperty.obj and area ( overlap ( tblProperty.OBJ , tblLeases.obj ) , ""sq m"" ) > 5 group by tblProperty.P_ID into PropertyOverlap"
print strcmd '// check that the syntax is correct
Run command strcmd
What do i need to change to have the correct areas returned when running the query from a mapbasic program?
Regards
Andrew