BulkCopyfromsourcetabletodestinationtablewithacolumnwhosetyp

WBOY
リリース: 2016-06-07 15:54:11
オリジナル
1121 人が閲覧しました

/*Author: Jiangong SUN*/ Ive 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:

/*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!

関連ラベル:
sun
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!