Hi folks,
I have a very basic report at the moment that uses the following SQL:
what I need to do is two things:
1. Show the number of days between the TRANSDATE and ENTRYDATE
2. Filter results to ONLY show those records where the TRANSDATE is more than a week before the ENTRYDATE
How can I do this?
I have a very basic report at the moment that uses the following SQL:
Code:
SELECT * FROM (SELECT ENTRYDATE, TRANSDATE, QUANTITY, COMPANY_CODE, PROJECT_CODE, RESOURCE_CODE, TASK_ID, CHARGE_CODE FROM
niku.PPA_WIP
UNION ALL
SELECT ENTRYDATE, TRANSDATE, QUANTITY, COMPANY_CODE, PROJECT_CODE, RESOURCE_CODE, TASK_ID, CHARGE_CODE FROM
niku.PPA_TRANSCONTROL) a
WHERE COMPANY_CODE = 'DST01UKT'
1. Show the number of days between the TRANSDATE and ENTRYDATE
2. Filter results to ONLY show those records where the TRANSDATE is more than a week before the ENTRYDATE
How can I do this?