Skip to main content
deleted 57 characters in body
Source Link

Here is the solution. In case of multiple deletion, use belowthose 2 query. note that run these SQL in same order as i have written heresql queries. FirstFirst sql query will link orders to customers, and second query will show the orders in the customers account (orders tab)

UPDATE sales_flat_order as SFO  
INNER JOIN customer_entity as C  
ON C.email = SFO.customer_email  
SET SFO.customer_id = C.entity_id  
WHERE SFO.customer_is_guest = 0 

UPDATE sales_flat_order_grid as SFOG  
INNER JOIN sales_flat_order as SFO  
ON SFO.entity_id = SFOG.entity_id  
SET SFOG.customer_id = SFO.customer_id

Here is the solution. In case of multiple deletion, use below 2 query. note that run these SQL in same order as i have written here. First sql query will link orders to customers, and second query will show the orders in the customers account (orders tab)

UPDATE sales_flat_order as SFO  
INNER JOIN customer_entity as C  
ON C.email = SFO.customer_email  
SET SFO.customer_id = C.entity_id  
WHERE SFO.customer_is_guest = 0 

UPDATE sales_flat_order_grid as SFOG  
INNER JOIN sales_flat_order as SFO  
ON SFO.entity_id = SFOG.entity_id  
SET SFOG.customer_id = SFO.customer_id

Here is the solution. In case of multiple deletion, use those 2 sql queries. First sql query will link orders to customers, and second query will show the orders in the customers account (orders tab)

UPDATE sales_flat_order as SFO  
INNER JOIN customer_entity as C  
ON C.email = SFO.customer_email  
SET SFO.customer_id = C.entity_id  
WHERE SFO.customer_is_guest = 0 

UPDATE sales_flat_order_grid as SFOG  
INNER JOIN sales_flat_order as SFO  
ON SFO.entity_id = SFOG.entity_id  
SET SFOG.customer_id = SFO.customer_id
spelling
Source Link

Here isis the solution. Thanks to In case of multiple deletion, use below 2 query. note that run these SQL in same order as i have written here. First sql query will link orders to customers, and second query will show the orders in the customers account (orders tab)

UPDATE sales_flat_order as SFO  
INNER JOIN customer_entity as C  
ON C.email = SFO.customer_email  
SET SFO.customer_id = C.entity_id  
WHERE SFO.customer_is_guest = 0 
AND FOR sales_flat_order_grid Table

UPDATE sales_flat_order_grid as SFOG  
INNER JOIN sales_flat_order as SFO  
ON SFO.entity_id = SFOG.entity_id  
SET SFOG.customer_id = SFO.customer_id

Here is the solution. Thanks to In case of multiple deletion, use below 2 query. note that run these SQL in same order as i have written here. First sql query will link orders to customers, and second query will show the orders in the customers account (orders tab)

UPDATE sales_flat_order as SFO  
INNER JOIN customer_entity as C  
ON C.email = SFO.customer_email  
SET SFO.customer_id = C.entity_id  
WHERE SFO.customer_is_guest = 0 
AND FOR sales_flat_order_grid Table

UPDATE sales_flat_order_grid as SFOG  
INNER JOIN sales_flat_order as SFO  
ON SFO.entity_id = SFOG.entity_id  
SET SFOG.customer_id = SFO.customer_id

Here is the solution. In case of multiple deletion, use below 2 query. note that run these SQL in same order as i have written here. First sql query will link orders to customers, and second query will show the orders in the customers account (orders tab)

UPDATE sales_flat_order as SFO  
INNER JOIN customer_entity as C  
ON C.email = SFO.customer_email  
SET SFO.customer_id = C.entity_id  
WHERE SFO.customer_is_guest = 0 

UPDATE sales_flat_order_grid as SFOG  
INNER JOIN sales_flat_order as SFO  
ON SFO.entity_id = SFOG.entity_id  
SET SFOG.customer_id = SFO.customer_id
Source Link

Here is the solution. Thanks to In case of multiple deletion, use below 2 query. note that run these SQL in same order as i have written here. First sql query will link orders to customers, and second query will show the orders in the customers account (orders tab)

UPDATE sales_flat_order as SFO  
INNER JOIN customer_entity as C  
ON C.email = SFO.customer_email  
SET SFO.customer_id = C.entity_id  
WHERE SFO.customer_is_guest = 0 
AND FOR sales_flat_order_grid Table

UPDATE sales_flat_order_grid as SFOG  
INNER JOIN sales_flat_order as SFO  
ON SFO.entity_id = SFOG.entity_id  
SET SFOG.customer_id = SFO.customer_id