I am facing a challenge with a SQL query.
Basically I would like to retrieve the registers which present a [Start] later than their respective [Outgoing tasks].
The table looks like this:
Main Project Main Link Name Start Outgoing tasks
A 1 A1 02.01.2012 A2
A 1 A2 01.01.2012 A3
…
The query I wrote is this one:
SELECT [Name], [Start], [Outgoing tasks]
FROM [Sheet1$]
WHERE [Main project] = 'A'
AND [Main link] = '1'
AND [Outgoing tasks] IS NOT NULL
AND [Start] > (SELECT [Start]
FROM [Sheet1$]
WHERE [Main project] = 'A'
AND [Main link] = '1'
AND [Name] = [Outgoing tasks])
It doesn’t return any error, however it simply doesn’t bring the expected results.
Do you guys know what might be wrong?
Any support is very appreciated!!!
Further info:
This table comes from a MS Project like application. So we have a milestone, its data, successor and predecessor. What I actually need is a list of milestones which have a start date later than its successor (Which is an error in the project management perspective). So if A1.Start > A2.Start, then i should appear in the results. Let me know if you need any further detail.
Try