2

I was looking for a MapBasic sentence to update a MapInfo table. I've got two tables and I want to update one of them (POINTS) with an attribute of another (REGIONS). I would like to update points with the name of the regions contained. I mean, I have two tables in MapInfo, a polygons table and a points table. I want to fill the column "municipality" with the names of the polygons which contain the points.

I was trying with different possibilities, using the command "update" such as

Update {Text Table} Set {Column}=ObjectInfo(Obj,3) 
 Select * From {Text Table} Where Str$(Obj)=”TEXT” 
  • Welcome David. Could you please clean this question up a bit by 1) producing a clearly defined question 2) describing in detail what you mean by "I was trying with different possibilities". The more succinct information you provide to the reader, the better the answer you are likely to receive. Thanks. – Aaron Aug 24 '14 at 16:42
  • you should edit your original question to add these details, not submit them as an answer. – Dan C Aug 26 '14 at 19:36
1

Table POINTS (with column REGION_NAME),

Table REGIONS (with column NAME)

Add Column "POINTS" (REGION_NAME) From REGIONS Set To NAME Where contains

You should replace names for your actual tables and columns.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.