# HG changeset patch # User Alain Mazy # Date 1687461350 -7200 # Node ID 6b16914b6655db564fefe52959df65bfe61b74b6 # Parent 7e123f047771057204bf5f0fbf8cbe44cd8a125c fix diff -r 7e123f047771 -r 6b16914b6655 Resources/Orthanc/Databases/ISqlLookupFormatter.cpp --- a/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp Thu Jun 22 18:07:41 2023 +0200 +++ b/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp Thu Jun 22 21:15:50 2023 +0200 @@ -658,18 +658,19 @@ if (dicomIdentifiersComparisons.size() > 0) { - std::string comparisons; - Toolbox::JoinStrings(comparisons, dicomIdentifiersComparisons, " AND "); - sql += (" AND internalId IN (SELECT id FROM DicomIdentifiers WHERE " - + comparisons + ") "); + for (std::vector::const_iterator it = dicomIdentifiersComparisons.begin(); it < dicomIdentifiersComparisons.end(); ++it) + { + sql += (" AND internalId IN (SELECT id FROM DicomIdentifiers WHERE " + *it + ") "); + } } if (mainDicomTagsComparisons.size() > 0) { std::string comparisons; - Toolbox::JoinStrings(comparisons, mainDicomTagsComparisons, " AND "); - sql += (" AND internalId IN (SELECT id FROM MainDicomTags WHERE " - + comparisons + ") "); + for (std::vector::const_iterator it = mainDicomTagsComparisons.begin(); it < mainDicomTagsComparisons.end(); ++it) + { + sql += (" AND internalId IN (SELECT id FROM MainDicomTags WHERE " + *it + ") "); + } } if (!labels.empty())