<?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 Script sintax in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-sintax/m-p/223531#M76035</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning, i've to build a SQL SELECT in order to merge two datas coming from different sources:&lt;/P&gt;&lt;P&gt;- a field coming from a file .xls&lt;BR /&gt;- another field coming from a ODBC&lt;/P&gt;&lt;P&gt;This will add the calculation of the margin range in the load script in order to use it in reports.&lt;/P&gt;&lt;P&gt;I started with a:&lt;/P&gt;&lt;P&gt;LEFT JOIN&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;//of xls data to ODBC&lt;/P&gt;&lt;P&gt;//Billing Key is the common key&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;,CASE&lt;BR /&gt;WHEN ROUND((a.Sales-b.Costs)/a.Sales,2) &amp;lt; -1 THEN 'less than -100%'&lt;BR /&gt;WHEN ROUND((a.Sales-b.Costs)/a.Sales,2) BETWEEN -.99 AND -.5 THEN 'FROM -100% and -50%'&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;ELSE 'ND'&lt;BR /&gt;END AS [range]&lt;BR /&gt;FROM (SELECT Billing Key,SUM(Costs) AS (Costs) FROM Days GROUP BY Billing Key) b&lt;BR /&gt;ON a.Billing Key=b.Billing Key;&lt;/P&gt;&lt;P&gt;But i don't understand what's going wrong, perhaps this sintax isn't correct? Thank you for help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Apr 2011 10:01:15 GMT</pubDate>
    <dc:creator>canmarroig</dc:creator>
    <dc:date>2011-04-20T10:01:15Z</dc:date>
    <item>
      <title>Script sintax</title>
      <link>https://community.qlik.com/t5/QlikView/Script-sintax/m-p/223531#M76035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning, i've to build a SQL SELECT in order to merge two datas coming from different sources:&lt;/P&gt;&lt;P&gt;- a field coming from a file .xls&lt;BR /&gt;- another field coming from a ODBC&lt;/P&gt;&lt;P&gt;This will add the calculation of the margin range in the load script in order to use it in reports.&lt;/P&gt;&lt;P&gt;I started with a:&lt;/P&gt;&lt;P&gt;LEFT JOIN&lt;BR /&gt;LOAD&lt;/P&gt;&lt;P&gt;//of xls data to ODBC&lt;/P&gt;&lt;P&gt;//Billing Key is the common key&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;,CASE&lt;BR /&gt;WHEN ROUND((a.Sales-b.Costs)/a.Sales,2) &amp;lt; -1 THEN 'less than -100%'&lt;BR /&gt;WHEN ROUND((a.Sales-b.Costs)/a.Sales,2) BETWEEN -.99 AND -.5 THEN 'FROM -100% and -50%'&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;ELSE 'ND'&lt;BR /&gt;END AS [range]&lt;BR /&gt;FROM (SELECT Billing Key,SUM(Costs) AS (Costs) FROM Days GROUP BY Billing Key) b&lt;BR /&gt;ON a.Billing Key=b.Billing Key;&lt;/P&gt;&lt;P&gt;But i don't understand what's going wrong, perhaps this sintax isn't correct? Thank you for help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 10:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-sintax/m-p/223531#M76035</guid>
      <dc:creator>canmarroig</dc:creator>
      <dc:date>2011-04-20T10:01:15Z</dc:date>
    </item>
  </channel>
</rss>

