Skip to main content
Notice removed Authoritative reference needed by CommunityBot
Bounty Ended with no winning answer by CommunityBot
Tweeted twitter.com/StackMagento/status/1427193424126648323
fixed grammer
Source Link
Msquare
  • 9.5k
  • 7
  • 30
  • 71

I need to get orders data directly from the database. I have got all orders (about 18,000) since January 2020. I need to do a join to customer_entity however, I realized that about 300 records were missing.

By investigating further, I found out that the customer_id value is null for most of the records. Some records which do have a customer_id column set but shipping address id fields are null. These latter occur for orders in processing status.

Most curious is the null value in the customer_id column of some orders, even in orders in complete status.

For the query, I need to join customersthe customer's table so it is not an option to get all data from the sales_order table.

Any help? Thanks

Jaime

I need to get orders data directly from database. I have got all orders (about 18,000) since January 2020. I need to do a join to customer_entity however, I realized that about 300 records were missing.

By investigating further, I found out that customer_id value is null for most of the records. Some records which do have customer_id column set but shipping address id fields are null. These latter occur for orders in processing status.

Most curious is the null value in customer_id column of some orders, even in orders in complete status.

For the query, I need to join customers table so it is not an option to get all data from sales_order table.

Any help? Thanks

Jaime

I need to get orders data directly from the database. I have got all orders (about 18,000) since January 2020. I need to do a join to customer_entity however, I realized that about 300 records were missing.

By investigating further, I found out that the customer_id value is null for most of the records. Some records do have a customer_id column set but shipping address id fields are null. These latter occur for orders in processing status.

Most curious is the null value in the customer_id column of some orders, even in orders in complete status.

For the query, I need to join the customer's table so it is not an option to get all data from the sales_order table.

Any help? Thanks

Jaime

Notice added Authoritative reference needed by jstuardo
Bounty Started worth 50 reputation by jstuardo
edited title
Link
jstuardo
  • 609
  • 3
  • 9
  • 26

customer_id = NULL in sales_order table?

Source Link
jstuardo
  • 609
  • 3
  • 9
  • 26

customer_id in sales_order table?

I need to get orders data directly from database. I have got all orders (about 18,000) since January 2020. I need to do a join to customer_entity however, I realized that about 300 records were missing.

By investigating further, I found out that customer_id value is null for most of the records. Some records which do have customer_id column set but shipping address id fields are null. These latter occur for orders in processing status.

Most curious is the null value in customer_id column of some orders, even in orders in complete status.

For the query, I need to join customers table so it is not an option to get all data from sales_order table.

Any help? Thanks

Jaime