Hello,
I'm trying to do a INSERT SELECT with condition but smthg seems to be wrong. I get an 1064 error for wrong syntax.
Here is the query :
INSERT INTO `db1`.`table`.`field` (
SELECT a.`field1` , a.`field2`
FROM `db2`.`table1` a, `db2`.`table2` b
WHERE a.`field1` = b.`field1`
AND b.`field2` = 'value'
)
WHERE a.`field1` = `db1`.`table1`.`field1`
Thank in advance for any suggestions