Select Using Join

Andrew21210

ADSM.ORG Member
Joined
Apr 10, 2008
Messages
97
Reaction score
2
Points
0
Hello all. I have been asked to produce a report of all nodes with the following information being critical: Node name, class name and contact field. TDPs are to be excluded from this query. Now, I suck at doing joins so I need some help. This select would span the nodes table and the backups table. If anyone can help out, drinks are on me ;) the file space name may be required as well but for now, the info above will suffice.
 
Not sure how you name your TDP nodes - something like this would work on some of my environments because we just suffix -TDP to the end of the node name:

Code:
select distinct(nodes.node_name),backups.class_name,nodes.contact from nodes,backups where nodes.node_name=backups.node_name and nodes.node_name not like '%TDP'

1526047178930.png
if you need to exclude tdp from the node info itself, then perhaps this would be more effective, but I'm only on a small test server at the moment:
Code:
select distinct(nodes.node_name),backups.class_name,nodes.contact from nodes,backups where nodes.node_name=backups.node_name and nodes.platform_name not like '%TDP%'
 
Back
Top