Data Base : MySql , MS-SQL, PGSQL
SDP Build : 8100 to 9000
Complete Department List:
select dept.deptid "Department ID",dept.deptname "Department Name",dept.phoneno "Phone No",dept.fax "Fax",sdorg.name "Site Name",aa.first_name "Department Head",dept.deptdesc "Department Description" from departmentdefinition dept left join sduser sd on sd.userid=dept.deptheadid left join aaauser aa on aa.user_id=sd.userid left join sitedefinition site on site.siteid=dept.siteid left join sdorganization sdorg on sdorg.org_id=site.siteid;
Complete Requester List:
SELECT aa.USER_ID,aa.FIRST_NAME "FullName", al.NAME "LoginName",al.DOMAINNAME "Domain",aacontact.EMAILID "Email",dept.DEPTNAME "Department",sdorg.NAME "Site",aacontact.LANDLINE "Phone",sd.JOBTITLE "JobTitle",aacontact.MOBILE "Mobile" FROM AaaUser aa LEFT JOIN UserDepartment userdept ON aa.USER_ID=userdept.USERID LEFT JOIN AAAUserContactInfo aausercontact ON aa.USER_ID=aausercontact.USER_ID LEFT JOIN AaaContactInfo aacontact ON aausercontact.CONTACTINFO_ID=aacontact.CONTACTINFO_ID LEFT JOIN DepartmentDefinition dept ON userdept.DEPTID=dept.DEPTID LEFT JOIN SiteDefinition site ON dept.SITEID=site.SITEID LEFT JOIN SDOrganization sdorg ON site.SITEID=sdorg.ORG_ID INNER JOIN SDUser sd ON aa.USER_ID=sd.USERID LEFT JOIN HelpDeskCrew helpdeskcrew ON sd.USERID=helpdeskcrew.TECHNICIANID LEFT JOIN AaaLogin al ON aa.USER_ID=al.USER_ID WHERE ((helpdeskcrew.TECHNICIANID IS NULL) AND (sd.STATUS = 'ACTIVE')) ORDER BY 2
Complete Technician List:
SELECT aa.USER_ID,aa.FIRST_NAME "FullName", al.NAME "LoginName",al.DOMAINNAME "Domain",aacontact.EMAILID "Email",dept.DEPTNAME "Department",sdorg.NAME "Site",aacontact.LANDLINE "Phone",sd.JOBTITLE "JobTitle",aacontact.MOBILE "Mobile" FROM AaaUser aa LEFT JOIN UserDepartment userdepartment ON aa.user_id=userdepartment.USERID LEFT JOIN AaaUserContactInfo aausercontact ON aa.USER_ID=aausercontact.USER_ID LEFT JOIN AaaContactInfo aacontact ON aausercontact.CONTACTINFO_ID=aacontact.CONTACTINFO_ID LEFT JOIN DepartmentDefinition dept ON userdepartment.DEPTID=dept.DEPTID LEFT JOIN SiteDefinition site ON dept.SITEID=site.SITEID LEFT JOIN SDOrganization sdorg ON site.SITEID=sdorg.ORG_ID INNER JOIN SDUser sd ON aa.USER_ID=sd.USERID INNER JOIN HelpDeskCrew helpdeskcrew ON sd.USERID=helpdeskcrew.TECHNICIANID LEFT JOIN AaaLogin al ON aa.USER_ID=al.USER_ID WHERE (sd.STATUS = 'ACTIVE') order by 2
Complete Incident Template List:
select rl.templateid "Template ID",rl.templatename "Template Name",aa.first_name "Created By",rl.COMMENTS "Comments" from requesttemplate_list rl left join aaauser aa on aa.user_id=rl.createdby where (rl.parent_service is null or aa.first_name='System') order by 1;
Complete Service Template List:
select sd.name "Service Catelog",rl.templatename "Template Name",aa.first_name "Created By",rl.COMMENTS "Comments" from requesttemplate_list rl left join aaauser aa on aa.user_id=rl.createdby left join servicedefinition sd on sd.serviceid=rl.parent_service where rl.parent_service is not null order by 1;