update Relations set Function='RealDatePayed' where ColName='RealDatePayed' and TableName='#OwePaidRentLodg' go