<?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: What is wrong with this code? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092104#M940299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This IF construction looks like part of a LOAD statement (because of the AS keyword) but there isn't any embedding LOAD to be found. That means that you are using IF as a control statement and the syntax for that one is different from the syntax of the IF() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a new field in table Trigger, write it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;Trigger:&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;client_id&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dm_name&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_dm_update_date,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF&lt;/STRONG&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;last_dm_update_date&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;) = floor(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;()),'Yes','No') as vpublish&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;FROM &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;last_update.qvd(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;qvd&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jan 2016 13:36:23 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2016-01-28T13:36:23Z</dc:date>
    <item>
      <title>What is wrong with this code?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092102#M940297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The comma before 'Yes' indicates a problem.&amp;nbsp; But I can't figure out what is wrong here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Trigger:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;client_id&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;dm_name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;last_dm_update_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;last_update.qvd(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;qvd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;If&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;last_dm_update_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'yyyy-MM-dd') = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(),'yyyy-MM-dd'),'Yes','No') as vpublish;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 13:28:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092102#M940297</guid>
      <dc:creator>rittermd</dc:creator>
      <dc:date>2016-01-28T13:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this code?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092103#M940298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;I don't know why you need to use date formatting within the if statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;Try this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;&lt;STRONG&gt;If(last_dm_update_date = Today(), 'Yes', 'No') as vpublish&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;Also why is this outside of the LOAD statement? is this part of another table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #575757;"&gt;May be you need the code to be like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: #575757;"&gt;&lt;STRONG&gt;Trigger:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(last_dm_update_date = Today(), 'Yes', 'No') as vpublish;&lt;BR /&gt;LOAD client_id, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dm_name, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_dm_update_date&lt;BR /&gt;FROM&lt;BR /&gt;last_update.qvd(qvd&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If for some reason your &lt;STRONG style="font-size: 13.3333px;"&gt;last_dm_update_date &lt;/STRONG&gt;is not read as date and is in YYYY-MM-DD format, then you can do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: #575757;"&gt;&lt;STRONG&gt;Trigger:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(last_dm_update_date = Today(), 'Yes', 'No') as vpublish;&lt;BR /&gt;LOAD client_id, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dm_name, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;Date(Date#(last_dm_update_date, 'YYYY-MM-DD'), '&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;YYYY-MM-DD') as &lt;/SPAN&gt;&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;last_dm_update_date&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;BR /&gt;FROM&lt;BR /&gt;last_update.qvd(qvd&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 13:32:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092103#M940298</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-28T13:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this code?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092104#M940299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This IF construction looks like part of a LOAD statement (because of the AS keyword) but there isn't any embedding LOAD to be found. That means that you are using IF as a control statement and the syntax for that one is different from the syntax of the IF() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want a new field in table Trigger, write it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;Trigger:&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;client_id&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dm_name&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;, &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; last_dm_update_date,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF&lt;/STRONG&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #3d3d3d;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;floor&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;last_dm_update_date&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;) = floor(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;()),'Yes','No') as vpublish&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;FROM &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;last_update.qvd(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;qvd&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 13:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092104#M940299</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-01-28T13:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this code?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092105#M940300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In which place, you are using IF statement ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you need to add into precedent load ? can you please post full script snippet ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 13:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-code/m-p/1092105#M940300</guid>
      <dc:creator />
      <dc:date>2016-01-28T13:36:36Z</dc:date>
    </item>
  </channel>
</rss>

