Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 SQL Server 导入和导出向导将数字(邮政编码)导入 SQL DB。该列是 Excel 中的文本,但是当我导入文件时,邮政编码列被映射到浮点类型,这导致任何带有前导零的值的 NULL 结果。
我创建了一个新列并使用 excel TEXT 函数重新格式化邮政编码。
=TEXT(P2,"0000")
然后我用新列导入了文件,新的邮政编码列有一个到 nvarchar(255) 的默认映射。