Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement

I want to use an If statement in my script to change values in my "Active" column from 'No' to 1 and "yes" to zero.

Been trying but I must be doing something wrong.

Thanks!

12 Replies
Not applicable
Author

LOAD "User_ID",
"User_Name",
"First_Name",
"Last_Name",
(
Inactive) as Active,
SSO,
1
as MFCount,
if((Inactive) ='No',1,0) AS ActiveFlag;

SQL SELECT * FROM IDONTKNOWWHAT;

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this

LOAD

"User_ID",
"User_Name",
"First_Name",
"Last_Name",
(
Inactive) as Active,
SSO,
1
as MFCount,

Pick(MixMatch(Trim(Inactive), 'Yes', 'No'), 1, 0) AS ActiveFlag;

Not applicable
Author

I got it to work. Thank you very much for you patience! I'm new at this!