开发者

Ignore records with null field when copying from one table to another using SSIS

Is it possible in a SSIS to ignore records that have a null field? For example i want to copy data from one database table to another, however Table A has some rubbish data in it and ha开发者_JAVA百科s some fields with nulls in them. I only want to copy records to Table B, that do not have any null fields.


Here are the two possible options that might work for you.

  1. You can use a query to read the data from the source table and filter out the records that have NULL value using WHERE clause. You can also have this query in a stored procedure and use the stored procedure as your data source.

  2. If the source in the SSIS package is reading from a table, you can use a Conditional Split transformation to separate the NULL and non-NULL records and use only the non-NULL records further down the pipeline.

I feel that the first option is easier because it gives you more control and it is also easier to maintain.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜