admin管理员组文章数量:1635832
/*Author: Jiangong SUN*/
I've encountered a problem when I do a sql bulk copy from a table in staging to the same table in production. Except for a same column has different types.
So when i synchronize the data, I have the following error:
The locale id '0' of the source column 'EntityId' and the locale id '1033' of thedestination column 'EntityId' do not match.
Whereas it's not the source of the error.
After strugling several hours, a solution is to use a CONVERT when I synchronize the data.
SELECT Id, CONVERT(varchar(60), EntityId) as EntityId FROM @TABLENAME WITH (NOLOCK) WHERE ID = @ID
Hope this helps!
Enjoy coding!
本文标签: tableSourceBulkCopytypeColumn
版权声明:本文标题:BulkCopy from source table to destination table with a column whose type is different 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1729217414a1190582.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论