How can I query against two tables for a specific condition?
To simplify suppose I have two tables; NODES and TESTS. They both have 2 columns NAME and STATUS. How can I write a query that can check the following condition:
-NODES name = 'some_node'
-NODES status = 'down'
-TESTS name = 'some_test'
-TESTS status = 'down'
I don't need to join the tables, I just need to run a query that can look for those conditions.
Currently we have a test that monitors both of these items individually:
SELECT TEST.Id, TEST.Name
FROM TEST
Where
(
(TEST.ID = 16) AND
(TEST.Status = 'UP')
)
select Nodes.status, Nodes.name
FROM Nodes
Where
(
(Nodes.Status = 'UP') AND
(Nodes.SysName = 'NODE_NAME')
)