>Lparameters lcMachineClass, tcMachineType, tcCursor > >Select Machines.mach_num, Machines.mach_name, ; > '(' + Transform(Count(MachineTasks.job_num)) + ') ' As job_count; > From Machines; > Left Join ; > (Select Schedule.job_num, Schedule.mach_num As sched_mach_num ; > From Schedule ; > Left Join Jobs On Schedule.job_num = Jobs.job_num ; > Where Jobs.Status = 'A' And Schedule.Status != 'C') MachineTasks ; > On Machines.mach_num = MachineTasks.sched_mach_num; > Where Machines.Status = 'A'; > And Machines.Class = lcMachineClass; > And Machines.Type = tcMachineType; > Group By Machines.mach_num, mach_name; > Into Cursor (tcCursor) Readwrite > >Replace job_count With '' For job_count = '(0)' In (tcCursor) >Goto Top In (tcCursor) > > > >>