<?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 when loading data from db in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741489#M1021044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;haaaaaaaaaaaaaa,this is basic..but forgotten. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 14:09:26 GMT</pubDate>
    <dc:creator>buzzy996</dc:creator>
    <dc:date>2015-03-18T14:09:26Z</dc:date>
    <item>
      <title>if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741473#M1021028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'm new here and, already asking questions!&lt;/P&gt;&lt;P&gt;I have a requirement to create an incremental load script from a table which has about 6,5kk entries, which I kind of succeeded at(I think), but another requirement is to alter all adjustment quantity made in a certain type of location zone to be zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached script works fine, but when I try to insert an if statement to do so, it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The if statement I've tried to write was:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;("&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Zone Code"]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;='ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is inserted anywhere within the load statement, the load fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong in here? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741473#M1021028</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741474#M1021029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Hi Robert,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;Just the syntax on your fieldname, try the below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;([&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Zone Code]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;='ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;hope that helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Joe&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:22:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741474#M1021029</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741475#M1021030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;([&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Zone Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;='ADJUST', 0, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741475#M1021030</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-03-18T12:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741476#M1021031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've inserted it as follows within the LOAD statement:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled2.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/81139_Untitled2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This is what I get when trying to reload or debug the script&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81138_Untitled.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I am pretty sure this is some dumb typo on my account, please could you help me?&lt;/P&gt;&lt;P&gt;Is there anything extra I could send your way to make it easier to pinpoint?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741476#M1021031</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741477#M1021032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same issue as in my reply to Joe above &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:34:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741477#M1021032</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741478#M1021033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it does not look like your having problem with the if statement, but a problem with your OLEDB SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u try post the full SQL string?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Teis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741478#M1021033</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741479#M1021034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is embarrassing, but I need to ask, what exactly do you mean by full sql string [edit!]?&lt;/P&gt;&lt;P&gt;Please find the script in it's current state attached to this post!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741479#M1021034</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741480#M1021035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in ur if statement their is a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;("&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Zone Code"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;='ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;([&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Zone Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;='ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741480#M1021035</guid>
      <dc:creator>buzzy996</dc:creator>
      <dc:date>2015-03-18T12:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741481#M1021036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This correction was suggested by Joe Simmons - the script still fails saying OLEDB read failed, there is a screenshot above&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:49:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741481#M1021036</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741482#M1021037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;might be case sensitive issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([Zone Code]='Adjust','0','Siva') or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;If([Zone Code]='adjust','0','Siva')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;If("Zone Code"='Adjust','0','Siva') or&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;If("Zone Code"='adjust','0','Siva')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:52:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741482#M1021037</guid>
      <dc:creator>buzzy996</dc:creator>
      <dc:date>2015-03-18T12:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741483#M1021038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like Shiva suggest, and add UPPER() to be sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;( &lt;SPAN style="color: #0000ff;"&gt;Upper( &lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Zone Code" ) &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;= 'ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;or &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;( &lt;SPAN style="color: #0000ff;"&gt;Upper( &lt;/SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Zone Code] ) &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;=' ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;Data in the fields are case sensitive!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;/Teis&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:59:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741483#M1021038</guid>
      <dc:creator />
      <dc:date>2015-03-18T12:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741484#M1021039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the part in your load statement add replace the SQL select with only&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; SELECT &lt;STRONG&gt;*&lt;/STRONG&gt; FROM "TBW_LIVE".dbo."TBW$Warehouse Entry" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;the * represent all fields in the database your are trying to load from&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;/Teis&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:06:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741484#M1021039</guid>
      <dc:creator />
      <dc:date>2015-03-18T13:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741485#M1021040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Upper( &lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Zone Code" ) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;= 'ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;( &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;Upper( &lt;/SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Zone Code] ) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;=' ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Quantity&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;Did not help as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;I've loaded the data without the problematic if statement - and confirmed that the zone code is all uppercase ADJUST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;So I believe this is not the issue. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;If I would send you the whole script, would you be able to incorporate this if statement for me correctly? Maybe then I would figure out what am I doing wrong? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;Thank you for all your help so far - I didn't expect that an if statement will cause me so much frustration!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;The script is in qvs format is attached to this post!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;Thanks again!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:21:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741485#M1021040</guid>
      <dc:creator />
      <dc:date>2015-03-18T13:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741486#M1021041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okey try this rename the result of your if statement to following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;( &lt;SPAN style="color: #0000ff; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;Upper( &lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Zone Code" ) &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;= 'ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;( &lt;SPAN style="color: #0000ff; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;Upper( &lt;/SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Zone Code] ) &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;= 'ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity2 //Remember no space in ''&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;It looks like u have 2 fields with the same name, that cant be done in same load.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;ex. will fail.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;Quantity,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;( &lt;SPAN style="color: #0000ff; font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;Upper( &lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Zone Code" ) &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;= 'ADJUST', '0',&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;Quantity&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/STRONG&gt;&lt;SPAN style="color: maroon; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;STRONG&gt;Quantity&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;/Teis&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741486#M1021041</guid>
      <dc:creator />
      <dc:date>2015-03-18T13:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741487#M1021042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Teis,&lt;/P&gt;&lt;P&gt;I basically stripped the script to the most essential part which is needed, in this case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WarehouseEntry:&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;&amp;nbsp; "Entry No_",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Zone Code",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quantity,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([Zone Code]='ADJUST', '0',Quantity) as Quantity2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM "TBW_LIVE".dbo."TBW$Warehouse Entry";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, looking at my data which I have loaded now&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled2.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/81155_Untitled2.png" style="font-size: 13.3333330154419px; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I can see that field Quantity2 does what I need to do, which is carry over the adjustment if the bin is not ADJUST, and insert 0 where the bin is ADJUST!&lt;/P&gt;&lt;P&gt;So, to avoid the problem, I've renamed the real Quantity field to be "Original Qty" and the changed field to be Quantity&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; "Entry No_",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Zone Code",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quantity as "Original Qty",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([Zone Code]='ADJUST', '0',Quantity) as Quantity;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM "TBW_LIVE".dbo."TBW$Warehouse Entry";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which lead to this&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/81156_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is what I wanted - Big thumbs up and thank you for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741487#M1021042</guid>
      <dc:creator />
      <dc:date>2015-03-18T13:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741488#M1021043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy to help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Teis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:57:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741488#M1021043</guid>
      <dc:creator />
      <dc:date>2015-03-18T13:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: if statement when loading data from db</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741489#M1021044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;haaaaaaaaaaaaaa,this is basic..but forgotten. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 14:09:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement-when-loading-data-from-db/m-p/741489#M1021044</guid>
      <dc:creator>buzzy996</dc:creator>
      <dc:date>2015-03-18T14:09:26Z</dc:date>
    </item>
  </channel>
</rss>

