From: Dirk H Bartley Date: Mon, 17 Dec 2007 20:30:45 +0000 (+0000) Subject: The "DISTINCT" keyword seems to be required if the joins for jobmedia X-Git-Tag: Release-3.0.0~2141 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=78c1838388399af2bd4d652835d60f1ad5da016e;p=bacula%2Fbacula The "DISTINCT" keyword seems to be required if the joins for jobmedia and media exist git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6068 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/joblist/joblist.cpp b/bacula/src/qt-console/joblist/joblist.cpp index 67d5e084b4..4664cd552c 100644 --- a/bacula/src/qt-console/joblist/joblist.cpp +++ b/bacula/src/qt-console/joblist/joblist.cpp @@ -154,7 +154,9 @@ void JobList::populateTable() int volumeIndex = volumeComboBox->currentIndex(); if (volumeIndex != -1) m_mediaName = volumeComboBox->itemText(volumeIndex); - query += "SELECT Job.Jobid AS Id, Job.Name AS JobName, " + QString distinct = ""; + if (m_mediaName != "Any") { distinct = "DISTINCT "; } + query += "SELECT " + distinct + "Job.Jobid AS Id, Job.Name AS JobName, " " Client.Name AS Client," " Job.Starttime AS JobStart, Job.Type AS JobType," " Job.Level AS BackupLevel, Job.Jobfiles AS FileCount,"