July 26, 2020 at 5:26 am
Hi,
I am using this expression in precedence constrain. If it is true, then go to the next step.
SUBSTRING(@FileName,"MyNetworkFolder\\xyz*.xls",1) > 0 ? "True" : "False"
For some reason, the expression didn't like *. What I am trying to do here is. If the variable @FilaName has file name start with Xyz and extension only .xls
Any thoughts?
July 26, 2020 at 4:09 pm
"for some reason..."
SUBSTRING() does not work with wildcards.
Something like this should do the trick:
upper(left(token( @FileName,"\\",tokencount( @FileName, "\\" )), 3)) == "XYZ" && upper(right(token( @FileName,"\\",tokencount( @FileName, "\\" )),4)) == ".XLS"?"TRUE":"FALSE"
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply