|
visakh16
Very Important crosS Applying yaK Herder
India
47023 Posts |
Posted - 11/16/2012 : 23:21:31
|
You can simply Add a expression inside data flow like this in derived column task
LEN([StringCol])-LEN(REPLACE([StringCol],"|",""))
then use it in a conditional task like
DerivedCol <4 and in the output store results in a variable using rowcount transform and in next step check if variable >0 and fail package.
another way is to open file inside script task using Read() function and then parse and check if count of | is below 4 and raise error
If you dont want to do all this in SSIS, just add a simple data flow task to dump file data as a single value onto a table
then use t-sql inside execute sql task to check if there are rows in table with | below 4 and throw error from sql code
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|