VERIFIED SOLUTION i

MapInfo Pro: Insert Statement Fails to Update Correct Field

Products affected: MapInfo Pro™

Issue

Statement issued in MapBasic window to update field in TAB file updates the wrong field.

Cause

Appending data from one table to another with tables where field structure is not aligned.
Executing the following:

Create Table "test1" (a Char(10),b Char(10),c Char(10)) file "C:\temp\test1.tab" TYPE NATIVE Charset "WindowsLatin1"
Create Table "test2" (z Char(10)) file "C:\temp\test2.tab" TYPE NATIVE Charset "WindowsLatin1"
insert into test2 (z) values ("aaa")
select b from test1 into querysel
insert into querysel(b) select * from test2


This results in Field A being updated when Field B should be updated.

Resolution

UPDATED: December 5, 2019
This has been confirmed as a defect (no resolution).
Workaround as follows:
Create Table "test1" (a Char(10),b Char(10),c Char(10)) file "C:\temp\test1.tab" TYPE NATIVE Charset "WindowsLatin1"
Create Table "test2" (z Char(10)) file "C:\temp\test2.tab" TYPE NATIVE Charset "WindowsLatin1"
insert into test2 (z) values ("aaa")
select * from test1 into querysel
insert into querysel(b) select * from test2