我现在一直在使用这个查询,但我很难过。我是 SQL 新手,我不知道为什么会出现错误:
SELECT customer_number, first_name_initial, last_name,serve_address_1, serve_address_2, serve_city, serve_state, route_serve_zip_code, phone_number1, referral_code
FROM customer_master
INNER JOIN route_detail
ON m.customer_number=r.customer_number
WHERE (referral_code='american')
错误
消息 209,级别 16,状态 1,第 1 行不明确的列名称“customer_number”。消息 209,级别 16,状态 1,第 1 行不明确的列名称“phone_number1”。
我尝试按如下方式附加列,但也没有运气。任何帮助将不胜感激!
SELECT customer_number, first_name_initial, last_name,serve_address_1, serve_address_2, serve_city, serve_state, route_serve_zip_code, phone_number1, referral_code
FROM customer_master m
INNER JOIN route_detail r
ON m.customer_number=r.customer_number
WHERE (referral_code='american')