Using Expressions in SSIS Casting Issue -


i'm using expressions in control flow choose different data flow tasks based upon name o file being parsed (basically loading data excel source ole db destination).

i'm using following expression , variants desired result:

(dt_i4) (dt_wstr, 2) findstring( @[user::srcfilepath] , "division", 1)

(dt_bool) (dt_wstr, 2) findstring( @[user::srcfilepath] , "division", 1)

(dt_bool) findstring( @[user::srcfilepath] , "division", 1)

i want dft executed if expression true. there casting errors coming.

the promising result comes when use expression: (dt_wstr, 2) findstring( @[user::srcfilepath] , "division", 1) answer '45' in string form cannot use logical operators or compare them against numbers ...

any appreciated.

why not compare findstring result against 0 (not found)?

findstring("division_abc.xls", "division", 1 ) > 0 

that evaluate true - replace "division_abc.xls" @[user::srcfilepath]


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -