We have been creating some new schedules and moving nodes from existing schedules to the new schedules. Because there is no move node from scheduleA to scheduleB, you have to do an add and deleted. So now I need to make sure we don't have a node on multiple schedules.
I know I can get a list of all the nodes associated with each schedule via "q association" and then look at all the schedules for a duplicate nodes. But there are about 15 schedules and over 300 nodes. And I can see if a given node is associated with multiple schedules via
select node_name,schedule_name from associations where node_name='ABC'
But this means I would have to run the command over 300 times.
What I want is to get a list of all the schedules for all the nodes.
I have tried something like:
select node_name,schedule_name from associations where node_name is (select node_name from node)
But I cannot seem to get the correct syntax. I want the output to be something like:
node_name schedule_name
----------- --------------
ABC SCHED1
DEF SCHED1
DEF SCHED2
GHI SCHED1
I know I can get a list of all the nodes associated with each schedule via "q association" and then look at all the schedules for a duplicate nodes. But there are about 15 schedules and over 300 nodes. And I can see if a given node is associated with multiple schedules via
select node_name,schedule_name from associations where node_name='ABC'
But this means I would have to run the command over 300 times.
What I want is to get a list of all the schedules for all the nodes.
I have tried something like:
select node_name,schedule_name from associations where node_name is (select node_name from node)
But I cannot seem to get the correct syntax. I want the output to be something like:
node_name schedule_name
----------- --------------
ABC SCHED1
DEF SCHED1
DEF SCHED2
GHI SCHED1