Updating AppendRegistrationRanges SQLQuery