I have a custom query that works fine, and shows all the CAB members against a change.
Code shown below
What I can't determine from the Change Diagram when I click GET, or from hunting through the database tables is where I get the CAB members approval status and any text they enter.
Just the tables will do I'll sort the SQL from there if it is quickest to do that way.
Thanks,
Andy
select CD.changeid as "Change" , title as "Title", ASD.StatusName AS "Approval Status", cr.FIRST_NAME "Requested by",
TU.First_name As "Approver" , CU.First_name as "CAB Reviewer" from ChangeDetails as CD left join ChangeApprovaldetails as CAD on
CD.ChangeID = CAD.ChangeID Left join aaaUser as TU on CAD.ApproverID = TU.USER_ID left join ApprovalStatusDefinition as ASD on
APPR_STATUSID = ASD.STATUSID left join changetocab as CTB on CTB.CHANGEID = CD.CHANGEID left join aaaUser as CU on CTB.USERID =
CU.USER_ID left join aaaUser as CR on CD.INITIATORID = CR.USER_ID
WHERE (((asd.STATUSNAME != N'Approved' COLLATE Latin1_General_CI_AS) OR (asd.STATUSNAME IS NULL)) AND (((cd.SCHEDULEDSTARTTIME
>= <from_thisquarter>) AND ((cd.SCHEDULEDSTARTTIME != 0) AND (cd.SCHEDULEDSTARTTIME IS NOT NULL))) AND ((cd.SCHEDULEDSTARTTIME <=
<to_thisquarter>) AND (((cd.SCHEDULEDSTARTTIME != 0) AND (cd.SCHEDULEDSTARTTIME IS NOT NULL)) AND (cd.SCHEDULEDSTARTTIME != -
1)))))