I am not sure this is the right forum. I am trying to use a stored procedure for mySql.
I get an error on my INSERT statement. Just trying to do a large data migration and find another way besides php. Thought maybe I could do this one in mySQL. I just want to populate my table with the customer ids and property ids that have matching previous customer ids. Any assistance would be appreciated.
Code:
CREATE PROCEDURE `f_agent`.`cust_prop` ()
BEGIN
INSERT INTO `f_agent`.`customer__property`
(`cust_prop_cust_id`, `cust_prop_prop_id`)
SELECT `customer`.`cust_id` `cust_prop_cust_id`, `property`.`prop_id` `cust_prop_prop_id`
FROM `f_agent`.`customer`
INNER JOIN `f_agent`.`property`
ON `customer`.`prev_cust_id` = `property`.`prev_cust_id`
END
I get an error on my INSERT statement. Just trying to do a large data migration and find another way besides php. Thought maybe I could do this one in mySQL. I just want to populate my table with the customer ids and property ids that have matching previous customer ids. Any assistance would be appreciated.