A submitter to The Daily WTF, John F., describes a migration gone subtly wrong. His company had sold part of its business and had to hand over customer documents and metadata stored in on-premises SharePoint. The plan: extract the metadata into a SQL Server database.

A colleague had started the job with Microsoft's ETL tool SSIS, which generated the database schema. John switched to PowerShell for more control and used System.Data.SqlClient.SqlBulkCopy for speed, which meant declaring exact .NET data types in his script.

One field was the customer number: up to 10 digits, often starting with two zeros. Someone long ago had stored it in a SharePoint Number field, which internally is a Double. Double precision can represent 10-digit numbers exactly, so far so good. The trap was the naming. In SQL Server the double-precision type is called float, while single precision requires float(24). John did not know this and mapped the float column to .NET float, single precision.

The doubles coming out of SharePoint were silently truncated to single precision on insert. Most records survived, but large customer numbers had their last few digits altered. The testers never noticed. The full load did. The team had to generate a list of the corrupted numbers and patch the data after the fact. The punchline: Microsoft platform to Microsoft platform with Microsoft tools, and the type names still got him.