SELECT DISTINCT tt.Test_Name
,skill1
,NAME
,empid
,PrimaryRole
,SecondaryRole
,PrimaryServiceTower
,manager
,Centers
,rating
,CONVERT(VARCHAR(10), round(CONVERT(FLOAT, (
(
SELECT TOP 1 TIME
FROM Test_Create_v3
) - (
SELECT MIn(TIME)
FROM test_results_v3
WHERE test_id = ee.test_id
)
)) / 60, 0)) + ' min' AS TimeTaken
INTO #Temp
FROM vw_Mgr_rpt ee
JOIN TCI_Test_Name tt WITH (NOLOCK) ON ee.id = tt.id
WHERE ee.Center = 'Global'
AND Test_Name IN (
'APJ_ASC_Retest_FY15'
,'FY15_Japan_Wave1'
)
AND empid NOT IN (
)
ORDER BY Test_Name --AND tt.Test_Name='ISS_WAVE1_FY15'
SELECT *
FROM #Temp
WHERE TimeTaken IS NOT NULL
AND ISNUMERIC(rating) > 0
AND Test_Name IN (
'HPSD_WAVE1_FY14'
,'HPSD_Wave1_FY15'
,'ISS_WAVE1_FY14'
,'BCS_Wave1_FY15'
,'HPN_WAVE1_FY14'
,'HPN_WAVE1_FY15'
,'ISS_WAVE1_FY15'
,'APJ_ASC_Retest_FY15'
,'FY15_Japan_Wave1'
)
AND Centers = 'CSC Japan'
AND empid NOT IN (
)
ORDER BY Test_Name
SELECT *
FROM #Temp
WHERE TimeTaken IS NOT NULL
AND ISNUMERIC(rating) > 0
AND Test_Name IN (
'APJ_ASC_Retest_FY15'
,'FY15_Japan_Wave1'
)
AND empid NOT IN (
)
ORDER BY Test_Name
SELECT DISTINCT Test_Name
FROM #Temp
WHERE TimeTaken IS NOT NULL
AND ISNUMERIC(rating) > 0
AND Test_Name IN (
'HPSD_WAVE1_FY14'
,'HPSD_Wave1_FY15'
,'ISS_WAVE1_FY14'
,'BCS_Wave1_FY15'
,'HPN_WAVE1_FY14'
,'HPN_WAVE1_FY15'
,'ISS_WAVE1_FY15'
)