Symptom: After importing data, List > Departments shows more departments than anticipated, and many of them have duplicate Department Codes.
Cause: When importing the departments, if the Department Code is longer than the field allows, it is truncated so it can fit and then the department is created. Unfortunately, the check to see if it is a duplicate value is done prior to truncating the value.
This means that if you have similar department names, like Department of Technical Services Floor 2 and Department of Technical Services Floor 3, which are only distinct from each other at the end, it will cause the duplicate values. Department of Technical Services Floor 2 will be truncated to Department of Technical Servic and created. Department of Technical Services Floor 3 will be checked for duplicates, will not cause a flag with Department of Technical Servic, so it will be truncated to fit the field, Department of Technical Servic, and created, etc.
Resolution: Download http://dl.waspbarcode.com/kb/ma/v7/MA7FixDuplicateDept.zip and extract it on the server machine. UpdateDB.wql is configured to run against a local WASPDBEXPRESS instance using the sa password created by our installer. If you are running the Enterprise version, you may need to edit that file with Notepad to enter the correct server\instance name, or a different admin password. Once that file is updated, run FixDuplicateDepartments.bat to update the database. Alternately, you can run the two SQL files in your SQL management studio, CreateSP.sql first, then ExecSP.sql.
This will remove the last character or two from each Department Code, then add a number, so they will each be unique. If you need to edit those Department Codes manually to shorten them and use your own convention instead, you may do so, but they will each need to be unique.
This duplication will cause the issue discussed in the article linked below: MobileAsset v7: Mobile device gives error "failed to generate database file"