diff --git a/tangostationcontrol/tangostationcontrol/common/configuration.py b/tangostationcontrol/tangostationcontrol/common/configuration.py
index 64a02bd701dbb5d28dfaadedac8b598693161f75..b95a21d72847f28b52cdcd86206637a4971c9b05 100644
--- a/tangostationcontrol/tangostationcontrol/common/configuration.py
+++ b/tangostationcontrol/tangostationcontrol/common/configuration.py
@@ -4,8 +4,7 @@ from itertools import islice
 
 DEVICE_PROPERTIES_QUERY = "SELECT device, property_device.name, property_device.value FROM property_device \
                         INNER JOIN device ON property_device.device = device.name \
-                        WHERE server LIKE '%' AND class LIKE '%' AND device LIKE '%' \
-                        AND class != 'DServer' \
+                        WHERE class != 'DServer' \
                         AND property_device.name != '__SubDevices' \
                         ORDER BY device, property_device.name, property_device.count ASC"
 
@@ -13,13 +12,11 @@ ATTRS_PROPERTIES_QUERY = "SELECT device, attribute, property_attribute_device.na
                         property_attribute_device.value \
                         FROM property_attribute_device \
                         INNER JOIN device ON property_attribute_device.device = device.name \
-                        WHERE server LIKE '%' AND class LIKE '%' AND device LIKE '%' \
-                        AND class != 'DServer' \
+                        WHERE class != 'DServer' \
                         ORDER BY device, property_attribute_device.name, property_attribute_device.count ASC"
 
 SERVER_QUERY = "SELECT server, class, name FROM device \
-            WHERE server LIKE '%' AND class LIKE '%' AND name LIKE '%' \
-            AND class != 'DServer' \
+            WHERE class != 'DServer' \
             ORDER BY server ASC"
 
 def get_db_data(db, tangodb_timeout:int = 10000):