Search code examples
mysqldbvisualizer

Update one table from another within MySQL, via DBVIS SQL commander


I have adapted the solutions already posted on this question to my task but it is still generating the error:

Unknown column testbr.Tel in 'field list'

UPDATE `Test_file_base_record_subset` `testbr`
INNER JOIN `UKTI_16sep15` `ukti`
ON `ukti.UKTI_Short_UID`=`testbr.ShortUID`
SET `testbr.Tel` = `ukti.UKTI_Tel`
WHERE `testbr.Year`=2015

Please tell me where I am going wrong. Thanks.


Solution

  • UPDATE `Test_file_base_record_subset` `testbr`
    INNER JOIN `UKTI_16sep15` `ukti` ON `ukti`.`UKTI_Short_UID`=`testbr`.`ShortUID`
    SET `testbr`.`Tel` = `ukti`.`UKTI_Tel`
    WHERE `testbr`.`Year`=2015