MSSQL and DB2 fix for including VAR.LAST_UPDATED_TIME in orderBy