<?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 SQL -- help ... is there another way? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-help-is-there-another-way/m-p/377791#M702040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some tables loaded in my script, and I want to 'pre-calc' some data between two tables ... somehow I think the way I implemented this is not really efficient . . . is there another way to do such thing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13449497103173419" jivemacro_uid="_13449497103173419"&gt;&lt;P&gt;CALLS_temp:&lt;/P&gt;&lt;P&gt;LOAD Calls.Callnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Calls.Serviceordernr&lt;/P&gt;&lt;P&gt;RESIDENT Calls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (CALLS_temp)&lt;/P&gt;&lt;P&gt;LOAD Serviceorders.Serviceordernr as Calls.Serviceordernr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Serviceorders.Serviceordernr&lt;/P&gt;&lt;P&gt;RESIDENT Serviceorders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Calls)&lt;/P&gt;&lt;P&gt;LOAD Calls.Callnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,if(isnull([Calls.Serviceordernr]),'No SO', if(isnull(Serviceorders.Serviceordernr),'yes','no')) as [Calls.SOisRemoved]&lt;/P&gt;&lt;P&gt;RESIDENT CALLS_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE CALLS_temp;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; some more explanation on the example above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Calls and I have Serviceorders . . . Calls contain a serviceordernr ... but some serviceordernr's are nog available in de ServiceOrder table (removed). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone has suggestions how to do this more efficient??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx for you help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Aug 2012 13:12:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-08-14T13:12:51Z</dc:date>
    <item>
      <title>SQL -- help ... is there another way?</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-help-is-there-another-way/m-p/377791#M702040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have some tables loaded in my script, and I want to 'pre-calc' some data between two tables ... somehow I think the way I implemented this is not really efficient . . . is there another way to do such thing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13449497103173419" jivemacro_uid="_13449497103173419"&gt;&lt;P&gt;CALLS_temp:&lt;/P&gt;&lt;P&gt;LOAD Calls.Callnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Calls.Serviceordernr&lt;/P&gt;&lt;P&gt;RESIDENT Calls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (CALLS_temp)&lt;/P&gt;&lt;P&gt;LOAD Serviceorders.Serviceordernr as Calls.Serviceordernr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Serviceorders.Serviceordernr&lt;/P&gt;&lt;P&gt;RESIDENT Serviceorders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Calls)&lt;/P&gt;&lt;P&gt;LOAD Calls.Callnr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,if(isnull([Calls.Serviceordernr]),'No SO', if(isnull(Serviceorders.Serviceordernr),'yes','no')) as [Calls.SOisRemoved]&lt;/P&gt;&lt;P&gt;RESIDENT CALLS_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE CALLS_temp;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; some more explanation on the example above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Calls and I have Serviceorders . . . Calls contain a serviceordernr ... but some serviceordernr's are nog available in de ServiceOrder table (removed). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone has suggestions how to do this more efficient??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx for you help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 13:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-help-is-there-another-way/m-p/377791#M702040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-14T13:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: SQL -- help ... is there another way?</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-help-is-there-another-way/m-p/377792#M702041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;// ==========&lt;/P&gt;&lt;P&gt;ServiceOrderNumbers:&lt;/P&gt;&lt;P&gt;Load Serviceorders.Serviceordernr RESIDENT Serviceorders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calls:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(IsNull([Calls.Serviceordernr]),'No SO',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Exists([Serviceorders.Serviceordernr],[Calls.Serviceordernr]),'no','yes')) as [Calls.SOisRemoved]&lt;/P&gt;&lt;P&gt;RESIDENT Calls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table ServiceOrderNumbers;&lt;/P&gt;&lt;P&gt;// ==============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you can directly check if there is a match between the Serviceordernr in the two tables. No temp tables. No joins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 13:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-help-is-there-another-way/m-p/377792#M702041</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-08-14T13:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: SQL -- help ... is there another way?</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-help-is-there-another-way/m-p/377793#M702042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for your answer . . . somehow I didn't came up with this, although I used it in the past &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;really thx . . . &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 13:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-help-is-there-another-way/m-p/377793#M702042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-14T13:46:12Z</dc:date>
    </item>
  </channel>
</rss>

