I know this question have been asked before, My previous similar question was dismissed cause there already is several like this.. but i just dont get this to work...
Ive tried this (in PHPmyAdmin) to update cell24 with value from table2 to table1
UPDATE name_table1 A
SET 'A.cell24' FROM 'B.cell24'
FROM name_table2 B
WHERE A.id = B.id
AND A.cell24 = NULL
But this cause "#1064 - You have an error in your SQL syntax;....."
And ive tried this:
UPDATE name_table1 A
SET A.cell24 = ( SELECT B.cell24
FROM name_table2 B )
And this works BUT it removes all values in the cell24 on other id's thats not supposed to be updated. Only the cell24 with equal id in both tables was correct updated. Rest was left blank
UPDATE name_table1 A
SET A.cell24 = ( SELECT B.cell24
FROM name_table2 B
WHERE A.id = B.id AND A.cell24 = NULL )
This caused all cell24 in table1 to be blank
Please help :P
(i would also need to know how i make this update with more cells in one query, ex i need to update cell24, cell25, cell26 IF the cell is empty (NULL) )