BulkCopy from source table to destination table with a column whose type is different
来源:互联网 发布:淘宝9月9号有活动吗 编辑:程序博客网 时间:2024/05/29 02:51
/*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!
0 2
- BulkCopy from source table to destination table with a column whose type is different
- geeksforgeeks Count all possible walks from a source to a destination with exactly k edges
- Select Column Name from a Table
- Add a column to table(Handling)
- 25.You need to create a table with the following column specifications:
- 1Z0-051 25. You need to create a table with the following column specifications:
- Add column to existing table with default value
- MySQL How to add a column in a table?
- The First Column in a Table Is Always Left-Aligned
- Cannot insert explicit value for identity column in table ‘table’ when IDENTITY_INSERT is set to OFF
- SWT - table layout - Resize the column of a table to fill all the available space
- SQL Server 2008 alter table column type
- Is the type of “pointer-to-member-function” different from “pointer-to-function”?
- SQL: CREATE a table from another table
- How to make a random selection from an SQL table
- Type of value has a mismatch with column typeCouldn't store . Expected type is DataRow.
- ORA-01754: a table may contain only one column of type LONG
- ORA-01779: cannot modify a column which maps to a non-key-preserved table
- Java NIO框架Netty教程(四)- ChannelBuffer
- 标准制定机构知识产权规则的反垄断分析
- jplogic v1.0 Java快速开发平台 Vs 目前市面上的快速开发平台
- Java NIO框架Netty教程(六)-Java NIO Selector模式
- commonfileupload组件文件上传
- BulkCopy from source table to destination table with a column whose type is different
- Servlet文件下载
- JAVA异常与事物回滚探究
- SUN公司JavaMail发送邮件
- JavaScript构造函数解析
- 深度学习读书笔记之RBM
- Java NIO框架Netty教程(七)-再谈收发信息次数问题
- 第三周作业——冒泡排序和归并排序
- Apache公司MultiPartEmail 邮件发送