July 24, 2019 at 1:41 pm
Hi
I have an SSIS package which runs an insert/update
I need to check if 4 fields(Boolean) are all set to False, if so then set another field(Boolean) to false as well showing the record to be inactive. I have tried the following but does not work.
Field
The following does not work
IsActive== False && SafetyBaseline == FALSE && RegulationBaseline == FALSE && EnvironmentSafetyBaseline == FALSE && EnvironmentSecurityBaseline == FALSE
Can someone help??
Regards
July 24, 2019 at 1:53 pm
Not tested, but the syntax will be more like this:
(SafetyBaseline == FALSE && RegulationBaseline == FALSE && EnvironmentSafetyBaseline == FALSE && EnvironmentSecurityBaseline == FALSE) ? IsActive = False: IsActive = TRUE
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
July 24, 2019 at 3:05 pm
Hi Phil
Thanks for the update, worked a charm.
Regards
July 24, 2019 at 3:12 pm
You want IsActive to be true if any of the four other values are TRUE, and FALSE only when they are all FALSE. If those are truly Boolean data types, you can just OR them together.
IsActive = ( SafetyBaseline || RegulationBaseline || EnvironmentSafetyBaseline || EnvironmentSecurityBaseline )
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply