There are two tables in my database. I am trying to update a column in table2 by setting it equal to one of the columns in table1. I've already looked at this answer visual foxpro - need to update table from another table And tried to do this on my code, however, I kept having a syntax error on UPDATE table2. Why? Here is what I have.
ALTER TABLE table2;
ADD COLUMN base2 B(8,2);
UPDATE table2
WHERE table2.itemid=table1.itemid from table1;
SET table2.base2=table1.base;
;in the update command. - Herb;wrong. You only need one at the end of a line that's being continued. Try writing each command on one line, rather than breaking it into multiple lines. - Herb