i want to join a column from customer_entity_varchar to sales_flat_order_grid table.
First of all, i did like this ,
- ADD NEW COLUMN CALLED AS COMPANY
ALTER TABLE sales_flat_order_grid ADD company varchar;
2. UPDATE COMPANY BY GETTING THE DATA FROM customer_entity_varchar
UPDATE sales_flat_order_grid SET company = (SELECT value from customer_entity_varchar where sales_flat_order_grid.customer_id = customer_entity_varchar.entity_id AND customer_entity_varchar.attribute_id = 1053)
Btw, it THIS CODE IS JUST INSERTING PRESENT DATA! I MEAN I WANT TO JOIN TABLE AND UPDATE IT TOTALLY! WHAT SHOULD I DO?