<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add Column through Edit Script using SQL Select / IF in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378331#M1170091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail, if(left(requirement_key,3)='TSR','Worksheet', 'Requirement') as status_type&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from....;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or potentially this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(left(requirement_key,3)='TSR','Worksheet', 'Requirement') as status_type;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from....;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2012 04:33:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-08-16T04:33:47Z</dc:date>
    <item>
      <title>Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378330#M1170090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a select statment pulling in multiple fields from various tables. One of the fields contains Alphanumeric codes as values of which I am trying to decode into a new column prior to loading the data. I assume this might be done using an IF statement, but have not had luck in doing so. For example, I start out with the following statment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Event:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from......;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to keep the values in &lt;EM&gt;requirement_key&lt;/EM&gt;, but I also need to add a new field &lt;EM&gt;status_type&lt;/EM&gt; that is populated with the results of the formula that decodes &lt;EM&gt;requirement key.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking that it would look something like the below statement. The IF statement needs to look at the first three characters in every row of &lt;EM&gt;requirement_key. &lt;/EM&gt;This will tell me if the row is a 'Worksheet' or a 'Requirement'. The results of the IF should populate the new column &lt;EM&gt;status_type &lt;/EM&gt;in the same row as the decoded &lt;EM&gt;requirement_key. &lt;/EM&gt;Unfortunately, I keep getting an error code 'missing right parenthesis' which doesn't make sense to me because I have three left and three right parenthesis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Event:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail, if((left(requirement_key,3)='TSR'),'Worksheet', 'Requirement') as status_type&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from....;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I confirmed this worked loading an example through an Excel file so I'm thinking its a SQL syntax I'm not entering properly. Please help!&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 04:24:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378330#M1170090</guid>
      <dc:creator />
      <dc:date>2012-08-16T04:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378331#M1170091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail, if(left(requirement_key,3)='TSR','Worksheet', 'Requirement') as status_type&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from....;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or potentially this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(left(requirement_key,3)='TSR','Worksheet', 'Requirement') as status_type;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from....;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 04:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378331#M1170091</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-16T04:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378332#M1170092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your quick response Johannes.&amp;nbsp; Results were not favorable this time, unfortunately:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This answer gave me the 'missing right parenthesis' error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail, if(left(requirement_key,3)='TSR','Worksheet', 'Requirement') as status_type&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;from....;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This answer gave me a 'field not found' error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(left(requirement_key,3)='TSR','Worksheet', 'Requirement') as status_type;&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;Select project_id, event_id, requirement_key, requirement_detail&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;from....;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;SPAN style="color: #000000;"&gt;Since I couldnt get either to work, I attached a slightly modified example of the script I'm trying to add this IF statment too in hopes that helps provide more context to how you would suggest tackling this.&lt;/SPAN&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 05:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378332#M1170092</guid>
      <dc:creator />
      <dc:date>2012-08-16T05:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378333#M1170093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this working for you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;*,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(Left(e.requirement_key,3)='TSR', 'WorkSheet', 'Requirement') as status_type;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select m.event_id, m.project_id, m.task_id, m.event_type, m.dttm_message_created, m.template_chosen,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pf.short_name client, IC.PRACTICE_NAME, IC.CATEGORY_NAME, IC.SUBCATEGORY_NAME, F.REGION_CODE,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.requirement_key, e.prompt, e.prompt_detail, e.supplier_name, e.response&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from SCMP.EVENT_INTEGRATION_MSG m, scmp.src_projects p, scmp.effort f, scmp.pt_client pf, SCMP.CATEGORIZATION_VW ic,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select distinct req.event_id, req.requirement_key, req.prompt, req.prompt_detail, req.response_type, rs.supplier_name, resp.response&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from scmp.event_requirement req, scmp.event_response resp, scmp.supplier rs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where resp.event_id = req.event_id&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and resp.requirement_key = req.requirement_key&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and resp.requirement_detail_key = req.requirement_detail_key&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and rs.external_supplier_id = resp.external_supplier_id) e&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 05:45:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378333#M1170093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-16T05:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378334#M1170094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't. I get the error message of 'field not found' (attached screenshot).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 13:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378334#M1170094</guid>
      <dc:creator />
      <dc:date>2012-08-16T13:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378335#M1170095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can you able to say, which field in qlikview , you want to trim?? Fieldname in qlikview not sql?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 13:46:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378335#M1170095</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-08-16T13:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378336#M1170096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In QlikView the field appears as REQUIREMENT_KEY. I'm not trying to trim it though. I'm trying to analyze the first three characters within each of the values of that field to return a new corresponding value (either 'Worksheet' or 'Requirement') in a new column (Status_Type) within the same table. Below is an example of the desired result of my above IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;REQUIREMENT_KEY&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;STATUS_TYPE&lt;/SPAN&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;REQ.2342312&lt;/TD&gt;&lt;TD&gt;Requirement&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TSR.23424232&lt;/TD&gt;&lt;TD&gt;Worksheet&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;REQ.234234215323&lt;/TD&gt;&lt;TD&gt;Requirement&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 14:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378336#M1170096</guid>
      <dc:creator />
      <dc:date>2012-08-16T14:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Add Column through Edit Script using SQL Select / IF</title>
      <link>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378337#M1170097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We determined the correct answer to be the below statement. Johannes provided the correct SQL syntax and Mayil triggered the thought of using the actual column header name from the raw data as it also appears in QlikView (REQUIREMENT_KEY) rather than the alias name (e.requirement_key) in the IF formula. Thank you everyone for your support!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Left(&lt;SPAN style="color: #339966;"&gt;REQUIREMENT_KEY&lt;/SPAN&gt;,3)='TSR', 'WorkSheet', 'Requirement') as status_type;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;Select m.event_id, m.project_id, m.task_id, m.event_type, m.dttm_message_created, m.template_chosen,&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pf.short_name client, IC.PRACTICE_NAME, IC.CATEGORY_NAME, IC.SUBCATEGORY_NAME, F.REGION_CODE,&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.requirement_key, e.prompt, e.prompt_detail, e.supplier_name, e.response&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;from SCMP.EVENT_INTEGRATION_MSG m, scmp.src_projects p, scmp.effort f, scmp.pt_client pf, SCMP.CATEGORIZATION_VW ic,&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (select distinct req.event_id, req.requirement_key, req.prompt, req.prompt_detail, req.response_type, rs.supplier_name, resp.response&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from scmp.event_requirement req, scmp.event_response resp, scmp.supplier rs&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where resp.event_id = req.event_id&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and resp.requirement_key = req.requirement_key&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and resp.requirement_detail_key = req.requirement_detail_key&lt;/EM&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and rs.external_supplier_id = resp.external_supplier_id) e&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 16:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-Column-through-Edit-Script-using-SQL-Select-IF/m-p/378337#M1170097</guid>
      <dc:creator />
      <dc:date>2012-08-16T16:58:41Z</dc:date>
    </item>
  </channel>
</rss>

