Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30370 Meta: Oracle SQL issues
  3. MDL-30776

Oracle database query error in gradebook

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 2.2
    • None
    • Gradebook
    • SUSE Linux Enterprise Server 11 (x86_64)
      Oracle Database 11.1
    • Oracle
    • MOODLE_22_STABLE

    Description

      When in a course click on gradebook link to access to gradebook, moodle shows a query exception with this message:
      ORA-00918: column ambiguously defined

      Because the query have an sql error, in duplicate email field:

      SELECT *
      FROM (SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email, email
      FROM m_user u
      JOIN (SELECT DISTINCT eu1_u.id
      FROM m_user eu1_u
      JOIN m_user_enrolments eu1_ue ON eu1_ue.userid = eu1_u.id
      JOIN m_enrol eu1_e ON (eu1_e.id = eu1_ue.enrolid AND eu1_e.courseid = :o_eu1_courseid)
      WHERE eu1_u.deleted = 0 AND eu1_u.id <> :o_eu1_guestid) je ON je.id = u.id
      ........ and the query continues

      Attachments

        Issue Links

          Activity

            People

              andyjdavis Andrew Davis
              apiedras Antonio Piedras Morente
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: