I've been asked to create a report from an existing database. The user wants to know when was the last time someone worked on a project. Normally, this would not be a problem, because there would be a table for the project and a separate table logging each time someone did work on the project. This database was done differently.
The project table has a date column for each possible project task. So, it is possible for more than one task date column to have a date. Plus, there is no particular order for entering dates in the task date fields. So, it is also possible for any task field to have a date when none of the other task fields have a date.
The project table, called PROJECT, has the following fields:
PROJECT_ID
TASK_1_DATE
TASK_2_DATE
TASK_3_DATE
TASK_4_DATE
TASK_5_DATE
Does anyone have any ideas on how I can write a SELECT statement to look through all the task date fields, and only return the highest or most recent date?
The project table has a date column for each possible project task. So, it is possible for more than one task date column to have a date. Plus, there is no particular order for entering dates in the task date fields. So, it is also possible for any task field to have a date when none of the other task fields have a date.
The project table, called PROJECT, has the following fields:
PROJECT_ID
TASK_1_DATE
TASK_2_DATE
TASK_3_DATE
TASK_4_DATE
TASK_5_DATE
Does anyone have any ideas on how I can write a SELECT statement to look through all the task date fields, and only return the highest or most recent date?