比较源表和目标表 [英] Compare the Source and Destination tables

查看:187
本文介绍了比较源表和目标表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个要求.我需要开发一个SSIS包,其中包含作为Excel的源和作为SQl服务器的目标.第一天,我已成功加载到目的地.第二天在源中添加了一个新列.因此,我需要在目标端动态添加一列.在这里,我需要比较源列和目标列.我需要编写一个存储过程来比较列.

您能否提供上述情况的存储过程.

在此先感谢,
Madhava.

Hi All,

I have a requirement. I need to develop a SSIS package which contains the source as Excel and destination as SQl server. First day i have successfully loaded into destination. Next day in the source One new column have added. So i need add a column at destination side dynamically. Here i need to compare the source and destination columns. I need to write a stored procedure to compare the columns.

Could you please provide the Stored procedure for above scenario.

Thanks in Advance,
Madhava.

推荐答案

首先将表从excel转移到SQL Server,然后将具有新转移的表的列与现有表进行比较,如果发生列不匹配,则添加/删除列.


否则,如果您知道Excel的表结构(新添加的列),则可以通过简单的ALTER语句轻松地将列添加到SQL Server中的表中.
First you transfer the tables from excel to SQL server then compare columns with the newly transferred table to the existing table, If column mismatch happen then add/delete columns.


Or else if u know the table structure(newly added column) of Your Excel, You can easily add columns to the table in SQL Server by simple ALTER Statement.


这篇关于比较源表和目标表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆