Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Substitute values

Hi,

I have a field called Inactive_Contact__c where the values are true or false.

eComContacts:

LOAD Id as ContactId,

    AccountId,

    Inactive_Contact__c,

    Business__c,

    Name;

SQL SELECT *

FROM Contact

WHERE AccountId != NULL;

How do I convert all the true values to YES and all the false values to null or -?

Labels (1)
1 Solution

Accepted Solutions
ramoncova06
Partner - Specialist III
Partner - Specialist III

you can use an if statement

eComContacts:

LOAD Id as ContactId,

    AccountId,

    if(Inactive_Contact__c = 'True','YES', null()) as Inactive_Contact__c ,

    Business__c,

    Name;

SQL SELECT *

FROM Contact

WHERE AccountId != NULL;

another option is to use wildmatch

View solution in original post

2 Replies
ramoncova06
Partner - Specialist III
Partner - Specialist III

you can use an if statement

eComContacts:

LOAD Id as ContactId,

    AccountId,

    if(Inactive_Contact__c = 'True','YES', null()) as Inactive_Contact__c ,

    Business__c,

    Name;

SQL SELECT *

FROM Contact

WHERE AccountId != NULL;

another option is to use wildmatch

Not applicable
Author

thanks ramon