Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8665689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:32:46+00:00 2026-06-12T17:32:46+00:00

Regarding the Column ” in field list is ambiguous error in MySQL. Its caused

  • 0

Regarding the Column '' in field list is ambiguous error in MySQL. Its caused if mysql cant figure what table the field name belongs to. Does anyone know a different approach to specifying the qualified table name for fields, other than prefixing the table name to the field itself. Say I have a list of fields like so

INSERT INTO dupes 
   ( lead_id,set_id,upload_date,agent,callcenter
    ,generation_date,vendors,first_name
    ,last_name,email,phone,address,city,state,zip,dob
    ,gender,marital_status,rented,year,make,model,trim
    ,vin,primary_use,miles_oneway,mileage,license_num,license_state
    ,education,job_title,license_status)

(SELECT lead_id,set_id,upload_date,agent,vendors,callcenter
    ,generation_date,first_name,last_name
    ,email,phone,address,city,state,zip,dob,gender,marital_status
    ,rented,year,make,model,trim,vin,primary_use,miles_oneway
    ,mileage,license_num,license_state,education,job_title
    ,license_status 
 FROM leads_auto 
 JOIN (
    SELECT vendors, email, MIN(lead_id) min_lead_id 
    FROM leads_auto 
    WHERE vendors = 1762
    GROUP BY vendors, email) y 
 ON    y.vendors = leads_auto.vendors 
   AND y.email = leads_auto.email 
   AND leads_auto.lead_id <> y.min_lead_id)

Now I was thinking of using GROUP_CONCAT([fields] SEPARATOR ',[table name].') to prefix the fields into a variable and then execute it. Does anyone else have any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:32:48+00:00Added an answer on June 12, 2026 at 5:32 pm

    I can see right away that the field ’email’ is ambiguous, because it exists in your first table leads_auto, and you’re selecting it in your JOIN. When you are using JOIN, you should prefix all of your SELECTions with an explicit table alias, like so:

    SELECT la.lead_id,la.set_id,la.upload_date,...  
    FROM leads_auto la
    JOIN (SELECT ...) y
    ...
    

    This way you can reference la.field_name or y.field_name and be explicit in which one you mean.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Regarding Django & Python: The Error: Exception Type: DatabaseError Exception Value: column objects_thing.name_id does
I have a doubt regarding MySQL. I have a table where it has some
I'm facing a problem regarding database and combo box. I got a table name
Regarding MS SQL-Server, Is the Primary Key column of a table, included in the
I've got a question regarding a SQL-select-query: The table contains several columns, one of
I'm reading about sqlalchemy and I saw following code: employees_table = Table('employees', metadata, Column('employee_id',
Regarding the regexp in TCL, if I use the following regexp: regexp helloworld\[\\s]+.name. to
A while back I posted a different question regarding column order. While this question
I have a couple of questions regarding MySQL indexing: 1) Is there any speed
According to the MySQL documentation regarding Optimizing Queries With Explain : * ALL: A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.