From 7397a58d3c1d46a1e32cd19900abac7f7aa49bcd Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Mon, 17 Dec 2007 20:30:45 +0000 Subject: [PATCH] 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 --- bacula/src/qt-console/joblist/joblist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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," -- 2.39.5