Since you need the activities "before" an activity with a non-null Date
field, it's hard to order the records. If you can rely on the id
field having the same ordering as the Date
field, then you could do something like this,
SELECT * FROM dbo.activities WHERE Date IS NULL AND id < (SELECT MAX(id) FROM dbo.activities WHERE Date IS NOT NULL);