Crew Usage and History

The queries below will provide an export OF your RentalPoint Labour IN Excel format. 

For Labour listed IN unarchived bookings 

/*This query will provide a summary OF crew requirements*/

SELECT IM.descriptionV6 [Designation],
       T.task_name [Task],
       C.trans_qty [Qty],
       C.FirstDate [Start Date],
       C.del_time_hour [Start Hour],
       C.del_time_min [Start Min],
       C.RetnDate [End Date],
       C.return_time_hour [End Hour],
       C.return_time_min [End Min],
       C.StraightTime,
       C.OverTime,
       C.DoubleTime
FROM tblCrew C
LEFT OUTER JOIN tblInvmas IM ON IM.product_code = C.product_code_v42
LEFT OUTER JOIN tblTask T ON T.task_number = C.task
WHERE ISNULL(C.person, '') = ''
ORDER BY IM.descriptionV6,
         T.task_name,
         C.FirstDate,
         C.del_time_hour,
         C.del_time_min 

/*IF you want TO list BY technician name USE the query below */
SELECT IM.descriptionV6 [Designation],
       T.task_name [Task],
       IM2.descriptionV6 [Technician],
       C.FirstDate [Start Date],
       C.del_time_hour [Start Hour],
       C.del_time_min [Start Min],
       C.RetnDate [End Date],
       C.return_time_hour [End Hour],
       C.return_time_min [End Min],
       C.StraightTime,
       C.OverTime,
       C.DoubleTime
FROM tblCrew C
LEFT OUTER JOIN tblInvmas IM ON IM.product_code = C.product_code_v42
LEFT OUTER JOIN tblTask T ON T.task_number = C.task
LEFT OUTER JOIN tblInvmas IM2 ON IM2.product_code = C.person
WHERE ISNULL(C.person, '') <> ''
ORDER BY IM2.descriptionV6,
         IM.descriptionV6,
         T.task_name,
         C.FirstDate,
         C.del_time_hour,
         C.del_time_min 

IF you want TO ACCESS archived bookings USE the following 

Labour listed IN archived bookings 

/*This will provide a summary OF crew requirements*/
SELECT IM.descriptionV6 [Designation],
       T.task_name [Task],
       C.trans_qty [Qty],
       C.FirstDate [Start Date],
       C.del_time_hour [Start Hour],
       C.del_time_min [Start Min],
       C.RetnDate [End Date],
       C.return_time_hour [End Hour],
       C.return_time_min [End Min],
       C.StraightTime,
       C.OverTime,
       C.DoubleTime
FROM tblHistCrew C
LEFT OUTER JOIN tblInvmas IM ON IM.product_code = C.product_code_v42
LEFT OUTER JOIN tblTask T ON T.task_number = C.task
WHERE ISNULL(C.person, '') = ''
ORDER BY IM.descriptionV6,
         T.task_name,
         C.FirstDate,
         C.del_time_hour,
         C.del_time_min 

/*IF you want TO list BY technician name USE the query below*/
SELECT IM.descriptionV6 [Designation],
       T.task_name [Task],
       IM2.descriptionV6 [Technician],
       C.FirstDate [Start Date],
       C.del_time_hour [Start Hour],
       C.del_time_min [Start Min],
       C.RetnDate [End Date],
       C.return_time_hour [End Hour],
       C.return_time_min [End Min],
       C.StraightTime,
       C.OverTime,
       C.DoubleTime
FROM tblHistCrew C
LEFT OUTER JOIN tblInvmas IM ON IM.product_code = C.product_code_v42
LEFT OUTER JOIN tblTask T ON T.task_number = C.task
LEFT OUTER JOIN tblInvmas IM2 ON IM2.product_code = C.person
WHERE ISNULL(C.person, '') <> ''
ORDER BY IM2.descriptionV6,
         IM.descriptionV6,
         T.task_name,
         C.FirstDate,
         C.del_time_hour,
         C.del_time_min