A Qlikview newbie here who is a novice with SQL. I am loading data from an ODBC connection (Access database) and I want to create an extra field which flags the data as one of two values. Here is the script I have used;
SQL SELECT `campaign_name`,
if(workspace_name = 'abc','VALUEA',
if(workspace_name = 'def','VALUEA',VALUEB) as email_type_final;
SQL Select *
The new field has been created but all records have been flagged with both VALUEA and VALUEB when only 100 of the records with the value 'abc' or 'def' shoudl be flagged VALUEA. Where have I gone wrong here?