开发者

making rules in SSIS while importing data to tables from a .csv files

i have to import data from a csv file 开发者_JS百科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.


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜