Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

syntax in load for if statements

so, I want to calculate some flag values..  basically, I want to do something like this..

if((personName = 1) and (todaysDate >= fieldStartDate) and (todaysDate <= fieldEndDate), 1, 0), as IsThereaRealPersonHereStatus

can I have this complex if statement in the data load script?

Thanks,

Maria

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I ended up doing personName * (todaysDate >= fieldStartDate) * (todaysDate <= fieldEndDate) as TheresaRealPersonHereStatus

it seems to work.. 

View solution in original post

2 Replies
m_woolf
Master II
Master II

syntax is:

if(personName = 1 and todaysDate >= fieldStartDate and todaysDate <= fieldEndDate, 1, 0) as IsThereaRealPersonHereStatus

Anonymous
Not applicable
Author

I ended up doing personName * (todaysDate >= fieldStartDate) * (todaysDate <= fieldEndDate) as TheresaRealPersonHereStatus

it seems to work..