<?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: If statement causes QV crash on load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-causes-QV-crash-on-load/m-p/329588#M121316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Kiran, based on your suggestion, I made some changes to my structure.&amp;nbsp; I placed all the fields in the resident load table which included the If statement.&amp;nbsp; Then I renamed the table and dropped the original table.&amp;nbsp; This has provided me with a quick reload and seems to giving me the result I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2012 16:46:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-07-02T16:46:30Z</dc:date>
    <item>
      <title>If statement causes QV crash on load</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-causes-QV-crash-on-load/m-p/329586#M121314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if anyone will be able to answer this but I'm having some issues with an if statement in my load script.&amp;nbsp; My script refreshes fine without the below statement but hangs and ultimately requires me to restart my computer when I include this the join with an if statement.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a flag in one of my tables based on two fields that are loaded from different tables and joined into one table.&amp;nbsp; The flag will indicate whether the current record has the same value in the second table as the record that was loaded from the first.&amp;nbsp; There is a one to many relationship between the first and second tables.&amp;nbsp; I wasn't able to successfully get the document to recognize the two fields (since they are coming from different tables) when included in the second statement until I moved it into a left join from the resident table.&amp;nbsp; I'm not sure I have the best approach here so I was hoping someone could provide me with a suggestion of how to optimize the creation of this flag and hopefully eradicate my issues with QV crashing.&amp;nbsp; Current load statement below - non-relevant fields were removed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCTable:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "n_case_id" as BCID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "n_version_id_latest_approved" as LatestApprovedVersionID;&lt;/P&gt;&lt;P&gt;//SQL statement not included here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right Join (BCTable)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "n_case_id" as BCID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "n_version_id" as VersionID;&lt;/P&gt;&lt;P&gt;//SQL statement not included here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (BCTable)&lt;/P&gt;&lt;P&gt;LOAD If(VersionID=LatestApprovedVersionID,1,0) as LatestApprovedFlag&lt;/P&gt;&lt;P&gt;Resident BCTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 16:15:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-causes-QV-crash-on-load/m-p/329586#M121314</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-02T16:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: If statement causes QV crash on load</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-causes-QV-crash-on-load/m-p/329587#M121315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kavin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the issue because the third statement doesnt have any common fields with BCTable. Instead of left join, did you try the following?&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_13412464800575816" jivemacro_uid="_13412464800575816"&gt;&lt;P&gt;LOAD BCID,VersionID,LatestApprovedVersionID,&lt;/P&gt;&lt;P&gt;If(VersionID=LatestApprovedVersionID,1,0) as LatestApprovedFlag&lt;/P&gt;&lt;P&gt;Resident BCTable;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might help. Better way (less memory intensive to QV) is to create the right join in SQL and use the previous script (SQL instead of resident).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 16:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-causes-QV-crash-on-load/m-p/329587#M121315</guid>
      <dc:creator />
      <dc:date>2012-07-02T16:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: If statement causes QV crash on load</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-causes-QV-crash-on-load/m-p/329588#M121316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Kiran, based on your suggestion, I made some changes to my structure.&amp;nbsp; I placed all the fields in the resident load table which included the If statement.&amp;nbsp; Then I renamed the table and dropped the original table.&amp;nbsp; This has provided me with a quick reload and seems to giving me the result I was looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 16:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-causes-QV-crash-on-load/m-p/329588#M121316</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-02T16:46:30Z</dc:date>
    </item>
  </channel>
</rss>

