Wednesday, 15 May 2013

sql server - Query error with 2 ambiguous column names in SQL -


I have been working with this question for a while and I have a hard time getting new to SQL and I can not understand their reason is that I get this error:

  select CUSTOMER_NUMBER, first_name_initial, last_name, serve_address_1, serve_address_2, serve_city, serve_state, route_serve_zip_code, phone_number1, the customer_master insider Join Where m.customer_number = r.customer_number on referral_code route_detail (referral_code = 'American')  

error

message 209, level 16, state 1, line 1Ndigd column called Grahk_anmber message 20 9, Level 16, State 1, Line 1 suspect column name 'phone_number1'.

I have tried to add the column as follows, but there is no luck with it. Any help would be greatly appreciated!

  CUSTOMER_NUMBER, the first_name_initial, last_name, serve_address_1, serve_address_2, serve_city, serve_state, route_serve_zip_code, phone_number1, referral_code customer_master meters Insider Join route_detail r on m.customer_number = r .customer_number where ( The problem is with this line   

pre> select customer_number

If you want to get the table Grahk_nmber the kind that you must specify:

  select r .customer_number Select  

or

  m.custo mer_number  

If your final query will look like this: