K
Kevin
I have the below code in a Pass through query that pulls from a Oracle DB.
It is pulling data from 2002 through today. It takes 13 minutes to run and I
really only need data where the KTMG_TIME_SHEET_LINE_DETAILS.ACTUAL_DATE is
equal to or greater than 12/31/2008. If I can get help with how the code
should be I think it will run much faster. Also is there a way to append
this data directly into a table named tbl_CompleteActualData?
SELECT KTMG_TIME_SHEETS.RESOURCE_USER_ID, KTMG_TIME_SHEETS.STATUS_CODE,
KTMG_TIME_SHEETS.PERIOD_ID, KTMG_TIME_SHEETS.TIME_SHEET_ID,
KTMG_TIME_SHEET_LINES.TIME_SHEET_LINE_ID, KTMG_TIME_SHEET_LINES.WORK_ITEM_ID,
KTMG_TIME_SHEET_LINES.WORK_ITEM_SET_ID,
KTMG_TIME_SHEET_LINE_DETAILS.ACTUAL_DATE,
KTMG_TIME_SHEET_LINE_DETAILS.ACTUAL_TIME,
KTMG_TIME_SHEET_LINE_DETAILS.TIME_SHEET_LINE_DETAIL_ID
FROM (KTMG_TIME_SHEET_LINES INNER JOIN KTMG_TIME_SHEETS ON
KTMG_TIME_SHEET_LINES.TIME_SHEET_ID = KTMG_TIME_SHEETS.TIME_SHEET_ID) INNER
JOIN KTMG_TIME_SHEET_LINE_DETAILS ON KTMG_TIME_SHEET_LINES.TIME_SHEET_LINE_ID
= KTMG_TIME_SHEET_LINE_DETAILS.TIME_SHEET_LINE_ID;
It is pulling data from 2002 through today. It takes 13 minutes to run and I
really only need data where the KTMG_TIME_SHEET_LINE_DETAILS.ACTUAL_DATE is
equal to or greater than 12/31/2008. If I can get help with how the code
should be I think it will run much faster. Also is there a way to append
this data directly into a table named tbl_CompleteActualData?
SELECT KTMG_TIME_SHEETS.RESOURCE_USER_ID, KTMG_TIME_SHEETS.STATUS_CODE,
KTMG_TIME_SHEETS.PERIOD_ID, KTMG_TIME_SHEETS.TIME_SHEET_ID,
KTMG_TIME_SHEET_LINES.TIME_SHEET_LINE_ID, KTMG_TIME_SHEET_LINES.WORK_ITEM_ID,
KTMG_TIME_SHEET_LINES.WORK_ITEM_SET_ID,
KTMG_TIME_SHEET_LINE_DETAILS.ACTUAL_DATE,
KTMG_TIME_SHEET_LINE_DETAILS.ACTUAL_TIME,
KTMG_TIME_SHEET_LINE_DETAILS.TIME_SHEET_LINE_DETAIL_ID
FROM (KTMG_TIME_SHEET_LINES INNER JOIN KTMG_TIME_SHEETS ON
KTMG_TIME_SHEET_LINES.TIME_SHEET_ID = KTMG_TIME_SHEETS.TIME_SHEET_ID) INNER
JOIN KTMG_TIME_SHEET_LINE_DETAILS ON KTMG_TIME_SHEET_LINES.TIME_SHEET_LINE_ID
= KTMG_TIME_SHEET_LINE_DETAILS.TIME_SHEET_LINE_ID;