Wyszukaj w bazie

Unit Number Already Exists Error on updating a unit in a Rent Plus Convert Database

Hint Ref: 020603240002
Hint Date: 24/03/2006

Hint Details:

On Rent Plus converted databases it is possible that two rooms with the same room number exist. At least one but sometimes both will have a status of 'Archived' so won't instantly be obvious to the user.
The script 'Find Duplicate Room Numbers and Update the Deleted One' in l:\sm4win\sql_scripts will allow this to be dealt with.
Run the select statement to check that the circumstances are as above and if so then run the update statement to set the unitnumber = unitnumber+'Z'.
Two assumptions are made:
1. Only one of the duplicates is deleted it could be both so run the select statement afterwords to check all issues have been dealt with and update manually if necessary.
2. There isn't already a room number equal to the existing duplicated with a 'Z' on the end of it.