0

I am using mapbasic to perform some calculations on a table. Everything is fine until I combine two .tab files.

enter image description here

Both files have identical table structures, however upon combination some numerical (float) values are being set as 0.

Values from HUNDRED_CL:

enter image description here

Values after combining the files:

enter image description here

The CR1 data is fine, but as soon as I append the CL1 data to it, some TO values become 0, can somebody assist?

Table structures for reference:

enter image description here

enter image description here

  • What SQL statement do you use the join the two tables? – Peter Horsbøll Møller Mar 16 '16 at 16:52
  • Insert Into HUNDRED_CR1 ( COL1, COL2, COL3, COL4, COL5, COL6, COL7, COL8, COL9) Select COL1, COL2, COL3, COL4, COL5, COL6, COL7, COL8, COL9 From HUNDRED_CL1 – Alan Carr Mar 17 '16 at 9:25
  • That's the Insert statement. What Select statement are you using to join the two tables? – Peter Horsbøll Møller Mar 17 '16 at 10:09
  • I'm not joining the tables beforehand, I'm just inserting everything from HUNDRED_CL1 into HUNDRED_CR1 to make a combined file. Selected snippet from the section of the code: pastebin.com/ex1YwvQT – Alan Carr Mar 17 '16 at 10:14
2

Your insert statement only specifies to insert the first 9 columns into the destination table.

The column where the values are zero, is column 10.

Unless the column names change, I would recommend that you use the real column names that will make it a lot easier to read.

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.