i have to import data from a csv file which contains records of users. the problem i face here is to verify that all required field is present. I need to check that all the lines contains the USER NAME(or some other values....).how do i make rule for this problem. m a newbie in SSIS. any help is appreciated. thanks in advance.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
A Conditional split will do what you need here. Just write your condition for error records to have blanks in any of your requried fields (i.e. if name and password and dept are all required, then the condition:
isnull(name) || (len(trim(name))==0) || isnull(password) || (len(trim(password))==0) || isnull(dept) || (len(trim(dept))==0)
would be the condition (if you use the defaults that come up in a conditional then this condition would be Case 1) for the Error rows.
In your flow, direct the arrow for Case 1 to your ERROR_USERS table write process, and the arrow for Conditional Split Default Output to your USERS Table.