← Back to team overview

enterprise-support team mailing list archive

[Bug 797754] Re: mysql.connector.errors.ProgrammingError: 1052: Column 'date' in field list is ambiguous

 

The error is valid and tells you wat the problem is: you have in both tables the field named 'date' (which is a bad name for a column btw).
Here some more code that shows the exact same error:

def bug797754():
    cnx = mysql.connector.connect(user='root',database='test')
    
    cur = cnx.cursor()
    cur.execute("DROP TABLE IF EXISTS t1")
    cur.execute("CREATE TABLE t1 (c1 DATE, c2 DATE)")
    cur.execute("UPDATE t1 AS a1, t1 as a2 SET c1 = GREATEST(c1,c2) "
        " WHERE a1.c1 = a2.c2")
    cur.close()
    cnx.close()

Anyway, not a bug, just that the query needs fixing.


** Changed in: myconnpy
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/797754

Title:
  mysql.connector.errors.ProgrammingError: 1052: Column 'date' in field
  list is ambiguous

To manage notifications about this bug go to:
https://bugs.launchpad.net/myconnpy/+bug/797754/+subscriptions