Example Query
SELECT server_id, status FROM ( SELECT server_id, rtd.getserverattributevalue(server_id,'Status') Status FROM apt_v_server s ) WHERE status IS NOT NULL ORDER BY server_id
The function listed above provides a reliable method of reporting on host/server attributes via the SQL Template Designer.
The apt_v_server_attribute is a dynamically created view, specific to your environment.