<?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: Conditions while loading via Edit Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562068#M209774</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are getting an error when executing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it should run, maybe I am missing something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should run as an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * WHERE Val &amp;gt;1;&lt;/P&gt;&lt;P&gt;LOAD Recno() as RecID, RAND()*3 as Val AutoGenerate 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as said, it might be better to add the WHERE to the SQL, so you avoid to query too many records first hand:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FILED1, &lt;/P&gt;&lt;P&gt;FIELD2, &lt;/P&gt;&lt;P&gt;FIELD3,&lt;/P&gt;&lt;P&gt;FIELD4,&lt;/P&gt;&lt;P&gt;IF(FIELD2 = 'X' And FIELD4 ='Y',0,1) AS FIELD42;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM ....................WHERE FIELD2 = 'X' AND FIELD4 ='Y';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should limit your records when querying the DB and you should only get a value of 1 in field FIELD42.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jul 2013 14:47:44 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-07-11T14:47:44Z</dc:date>
    <item>
      <title>Conditions while loading via Edit Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562063#M209769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FILED1, &lt;/P&gt;&lt;P&gt;FIELD2, &lt;/P&gt;&lt;P&gt;FIELD3,&lt;/P&gt;&lt;P&gt;FIELD4,&lt;/P&gt;&lt;P&gt;IF(FIELD2 = 'X' And FIELD4 ='Y',0,1) AS FIELD42;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM ....................WHERE FIELD42 &amp;gt; 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 15:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562063#M209769</guid>
      <dc:creator>easternfish</dc:creator>
      <dc:date>2013-07-10T15:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Conditions while loading via Edit Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562064#M209770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, FIELD42 is not known at the time the WHERE clause is executed. Either use the full condition in your SQL SELECT WHERE clause, or a preceding load with your new field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * WHERE FIELD42 &amp;gt; 0;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FILED1, &lt;/P&gt;&lt;P&gt;FIELD2, &lt;/P&gt;&lt;P&gt;FIELD3,&lt;/P&gt;&lt;P&gt;FIELD4,&lt;/P&gt;&lt;P&gt;IF(FIELD2 = 'X' And FIELD4 ='Y',0,1) AS FIELD42;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM ....................;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this will query the complete record set from your DBMS, then only limit the records on your QV client side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 16:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562064#M209770</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-10T16:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Conditions while loading via Edit Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562065#M209771</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;Can you please provide a sample on how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 17:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562065#M209771</guid>
      <dc:creator>easternfish</dc:creator>
      <dc:date>2013-07-10T17:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Conditions while loading via Edit Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562066#M209772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't quite understand. What about the script snippet in my previous post?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 22:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562066#M209772</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-10T22:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Conditions while loading via Edit Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562067#M209773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry I didn’t notice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * WHERE FIELD42 &amp;gt; 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where would I input this information on a new TAB or same TAB above the SQL SELECT *.&lt;/P&gt;&lt;P&gt;Because I tried using it this way and it wouldn’t run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * WHERE FIELD42 &amp;gt; 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILED1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD3,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD4,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(FIELD2 = 'X' And FIELD4 ='Y',0,1) AS FIELD42;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM ....................;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 14:38:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562067#M209773</guid>
      <dc:creator>easternfish</dc:creator>
      <dc:date>2013-07-11T14:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conditions while loading via Edit Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562068#M209774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are getting an error when executing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it should run, maybe I am missing something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should run as an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * WHERE Val &amp;gt;1;&lt;/P&gt;&lt;P&gt;LOAD Recno() as RecID, RAND()*3 as Val AutoGenerate 100;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as said, it might be better to add the WHERE to the SQL, so you avoid to query too many records first hand:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FILED1, &lt;/P&gt;&lt;P&gt;FIELD2, &lt;/P&gt;&lt;P&gt;FIELD3,&lt;/P&gt;&lt;P&gt;FIELD4,&lt;/P&gt;&lt;P&gt;IF(FIELD2 = 'X' And FIELD4 ='Y',0,1) AS FIELD42;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM ....................WHERE FIELD2 = 'X' AND FIELD4 ='Y';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should limit your records when querying the DB and you should only get a value of 1 in field FIELD42.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 14:47:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562068#M209774</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-11T14:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditions while loading via Edit Script</title>
      <link>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562069#M209775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok Let me try it again.  quick question I have this report running perfect in MS Access and I have multiple IIF and Criteria in the design followed by a multitude of Left Joins (for 10 different tables).  What do you recommend would be the proper way to transition and move this report without having any mayor difficulties?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for all your help so far!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 15:14:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditions-while-loading-via-Edit-Script/m-p/562069#M209775</guid>
      <dc:creator>easternfish</dc:creator>
      <dc:date>2013-07-11T15:14:18Z</dc:date>
    </item>
  </channel>
</rss>

