Combine scripts

dicowins

ADSM.ORG Member
Joined
Nov 8, 2002
Messages
44
Reaction score
6
Points
0
Website
Visit site
PREDATAR Control23

I have two sql statements

select domain_name,schedule_name,count(*) from associations group by domain_name,schedule_name

and

select domain_name,schedule_name,action,sched_style,starttime,period,perunits,duration,durunits,dayofweek,enh_month,dayofmonth,weekofmonth,expiration from client_schedules

So the first creates a unique list of Domeain names and schedules and calculates the No of nodes per schedule.

I want to then fill in the unique values selected in the second sql line and add those details to the first list
 
PREDATAR Control23

I have two sql statements

select domain_name,schedule_name,count(*) from associations group by domain_name,schedule_name

and

select domain_name,schedule_name,action,sched_style,starttime,period,perunits,duration,durunits,dayofweek,enh_month,dayofmonth,weekofmonth,expiration from client_schedules

So the first creates a unique list of Domeain names and schedules and calculates the No of nodes per schedule.

I want to then fill in the unique values selected in the second sql line and add those details to the first list

Inner join as mentioned...

select client_schedules.domain_name, client_schedules.schedule_name, dayofweek, duration, count(associations.schedule_name) as Counts from client_schedules inner join associations on client_schedules.schedule_name = associations.schedule_name group by client_schedules.domain_name, client_schedules.schedule_name, dayofweek, duration

Fill in the rest of the columns you need, both after select and after Group by.
 
PREDATAR Control23

This is a useful script. Is there a way to get the node names associated to a specific schedule that also includes the OS Platform per node?
 
PREDATAR Control23

I use this It contains OS and Client level:
select nodes.node_name,nodes.platform_name,nodes.client_version,nodes.client_release,nodes.client_level,nodes.client_sublevel from nodes,associations where associations.schedule_name = 'someschedulename' and nodes.node_name = associations.node_name
 
Top