This page was last edited on August 8, 2018, at 19:02.
Comments or questions about this documentation? Contact us for support!
Software product name | PerformanceDNA |
Version Number | 8.5.x and Below |
Subject | Lost lead zeros when importing Orgdata |
You are using the Orgdata process to import user data and build a reporting hierarchy and find that data with a leading 0 (zero) is missing the 0(s). When checking the Orgdata process the data is correct in the Staging table however it is incorrect in the Orgdata table and Users data within the product.
The issue is caused by SQL server converting each value in to the most suitable data type based on the value’s content. This results in numbers with leading 0s being treated as a number and the leading 0s are stripped meaning 000023 becomes 23. There are 2 possible solutions to overcome this issue:
<ImportSources CsvFilePath="C:\Genesys\Applications\OrgData\CurrentData"
BackupFilePath="C:\Genesys\Applications\OrgData\BackedUpData"
PostImportSql="TRUNCATE Orgdata INSERT INTO Orgdata (Id, EmployeeID, FirstName, LastName, PositionID, PositionName, LMPositionID, CacheData, WfmUserId, PortalEmplId, PortalRole, Site,TeamManagerID) Select Id, EmployeeID, FirstName, LastName, PositionID, PositionName, LMPositionID, CacheData, WfmUserId, PortalEmplId, PortalRole, Site,TeamManagerID
FROM Staging">