Update Sql query from 1c