I have a comma separated list that I would like to parse with a 0 or 1 if the text is present.
For example, my list looks like this:
- apache, namecheap_dns, wordpress
- google_apps, dns_made_easy, ubuntu, google_adsense, wordpress, nginx
- apache, wordpress
- apache, google_maps
- apache, google_maps, google_analytics, google_tag_manager
- microsoft_exchange_online, sendgrid, outlook, microsoft_office_365, google_analytics, youtube, twitter_button, talend, oracle_peoplesoft, sage_50cloud, quickbooks, webmethods, sap_hana, oracle_data_integrator, informatica, db2, apache_tomcat, alteryx, ...
- apache, apache_http_server, github, godaddy_nameserver, google_analytics, google_maps, hotjar, microsoft_power_bi, mysql, recaptcha, sap_crm, tawk
I would like to create a new variable called "Apache" and have a 0 for records that do not have apache in the list and 1 where it is present.
I have tried the following command, but it only returns 0's, and I'm not sure why.
COMPUTE NewVar_Apache = (CHAR.INDEX(UPCASE(CurrentTechVar),'apache') > 0).
EXECUTE.
#SPSSStatistics#Support#SupportMigration