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 - Unable to make sub reports with Jasper -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -

Passing Variables from AngelScript to C++ -