thanks for pointing me in the right direction, sorry i didn't reply for a while now, been so much tied up.
After looking at your solution, i had time to play with it, and this below did it for me:
from t in Tbl_TimeTables
where t.FK_ClassId == 11
group t by new
{
t.FK_ClassId,
t.LectureDays
} into groupings
let counter = groupings
.Select(p => p.Period)
.Distinct()
.Count()
where counter < 7
select new
{
ClassId = groupings.Key.FK_ClassId,
Days = (from grouping in groupings
select grouping.LectureDays).Distinct()
}
I just had to change the group by key to lecturedays instead of period, which removed the series of results i was getting to just one result.
Thanks very much Dan