> Are you only looking for the single, most recent
> Configuration that existed before the first DateTimeAdded in
> ImportData?
Close, you gave me a pointer thou :-) I was wanting ALL configuration's
that were active in ImportData, the final SQL I used (using a JOIN was:
SELECT
ConfigurationID, StartDate
FROM
Configuration C
WHERE
C.StartDate
BETWEEN
(
SELECT
MIN(DateTimeAdded)
FROM
ImportData
) AND (
SELECT
MAX(DateTimeAdded)
FROM
ImportData
)
UNION SELECT
ConfigurationID, StartDate
FROM
Configuration
WHERE
StartDate =
(
SELECT
MAX(StartDate)
FROM
Configuration
WHERE
StartDate < ( SELECT MIN(DateTimeAdded) FROM ImportData )
)
ORDER BY
StartDate
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz