From 56139b708e1dadf61287c4b42acc6d10fab57a60 Mon Sep 17 00:00:00 2001 From: Rajitha Kumara Date: Mon, 22 Jul 2024 22:11:43 +0530 Subject: [PATCH] Fix syntax error --- .../core/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java index 7ae29f29d8..2565f2c2f8 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/dao/impl/AbstractDeviceDAOImpl.java @@ -3505,7 +3505,8 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO { boolean isDeviceNameProvided = false; try { Connection connection = getConnection(); - String sql = "SELECT COUNT(DISTINCT e.DEVICE_ID) FROM DM_DEVICE d INNER JOIN DM_ENROLMENT e " + + String sql = "SELECT COUNT(DISTINCT e.DEVICE_ID) AS COUNT " + + "FROM DM_DEVICE d INNER JOIN DM_ENROLMENT e " + "ON d.ID = e.DEVICE_ID " + "WHERE e.TENANT_ID = ? " + "AND e.DEVICE_ID IN (" + deviceIdStringList+ ") " +