Unanswered: Copy table column to another table column?
I need to copy all values in one table column to the column in another table, where the ID's for each row in the first table is the same as the value in the column POST_ID in the new table, and the value in the column POST_TYPE in the new table is "CD", is this possible? I have com up with this, but it does not work. I am very new to mysql so there is probably basic errors in my code, please advice.
(searchindex = the table to receive data
POST_DATE = the column to receive data
cd = the table where the data resides
CD_DATE = the column where the data resides
POST_ID and POST_TYPE is together a unique identifier for a row in other tables)
INSERT INTO searchindex (POST_DATE ) SELECT CD_DATE FROM cd WHERE
ID=searchindex.POST_ID && searchindex.POST_TYPE="CD"
The above sql creates the error: Unknown table 'searchindex' in where clause