Thanks for that, Mailman.
The first crosstab part is fine, as it displays each ID record with S01, S02 etc fields with flags where relevant.
But the for the 2nd part I need to update the flat file fields named 'ASP', 'CONSULTANCY', CONTRACT' with the corresponding S01, S02, S03 flags...