1


I get error (1054): Unknown column 'wp_jpnx_survey_code.supplier_id' in 'field list'
But that column does exist... Does anyone know why or how to fix this?

This is the code I used:

CREATE VIEW survey_codes_complete_overview AS SELECT *, wp_jpnx_survey_code.supplier_id AS a_id, wp_jpnx_survey_supplier_info.supplier_id AS b_id FROM wp_jpnx_survey_code AS a LEFT JOIN wp_jpnx_survey_supplier_info AS b ON a.supplier_id = b.supplier_id; 

1 Answer 1

2

You are using aliases for those tables. So, specify the alias when selecting the column.

CREATE VIEW survey_codes_complete_overview AS SELECT *, a.supplier_id AS a_id, b.supplier_id AS b_id FROM wp_jpnx_survey_code AS a LEFT JOIN wp_jpnx_survey_supplier_info AS b ON a.supplier_id = b.supplier_id 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.