update Relations set Function='Max(brStudenti)' where TableName='#OwePaidRentForMonth' and ColName = 'BrStudenti' go update Relations set Function='Max(NumStud)' where TableName='v_DaylyListForPeriod' and ColName = 'NumStud'