<?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 Salesforce SQL select not in future in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Salesforce-SQL-select-not-in-future/m-p/804368#M665914</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;i am trying to ensure no scheduled Salesforce Activities in the future are loaded, but my WHERE clause doesn't seem to be correct. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activities:&lt;/P&gt;&lt;P&gt;LOAD Id AS ActivityId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'eCommerce' AS ActivityOrg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subject,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActivityDate AS CalendarDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OwnerId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description AS eCommercePublicNotes,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM Task&lt;/P&gt;&lt;P&gt;WHERE ActivityDate &amp;lt;= Today(); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 13:45:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-16T13:45:40Z</dc:date>
    <item>
      <title>Salesforce SQL select not in future</title>
      <link>https://community.qlik.com/t5/QlikView/Salesforce-SQL-select-not-in-future/m-p/804368#M665914</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;i am trying to ensure no scheduled Salesforce Activities in the future are loaded, but my WHERE clause doesn't seem to be correct. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activities:&lt;/P&gt;&lt;P&gt;LOAD Id AS ActivityId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'eCommerce' AS ActivityOrg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subject,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActivityDate AS CalendarDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OwnerId,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description AS eCommercePublicNotes,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM Task&lt;/P&gt;&lt;P&gt;WHERE ActivityDate &amp;lt;= Today(); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 13:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Salesforce-SQL-select-not-in-future/m-p/804368#M665914</guid>
      <dc:creator />
      <dc:date>2015-01-16T13:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce SQL select not in future</title>
      <link>https://community.qlik.com/t5/QlikView/Salesforce-SQL-select-not-in-future/m-p/804369#M665915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Today() is a qlikview function. You can't use qlikview functions in SQL statements since those are processed by the dbms and not by qlikview. According to &lt;A href="http://www.salesforce.com/us/developer/docs/soql_sosl/" title="http://www.salesforce.com/us/developer/docs/soql_sosl/"&gt;SalesForce.com SOQL and SOSL Reference&lt;/A&gt; you can use TODAY instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2 class="helpHead2" style="font-size: 14px; color: #51638a; padding-bottom: 1px; margin-top: 1.2em; margin-bottom: 0.3em; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #51638a; font-family: Arial, Helvetica, Verdana, sans-serif;"&gt;Date Literals&lt;/H2&gt;&lt;P class="p" style="font-size: 12px; margin-top: 1em; margin-bottom: 1em; color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif;"&gt;A &lt;VAR class="keyword varname"&gt;fieldExpression&lt;/VAR&gt;can use a date literal to compare a range of values to the value in a&lt;SAMP class="java codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;date&lt;/SAMP&gt;or&lt;SAMP class="java codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;dateTime&lt;/SAMP&gt;field. Each literal is a range of time beginning with midnight (12:00:00). To find a value within the range, use&lt;SAMP class="soql codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;=&lt;/SAMP&gt;. To find values on either side of the range, use&lt;SAMP class="soql codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;&amp;gt;&lt;/SAMP&gt;or&lt;SAMP class="soql codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;&amp;lt;&lt;/SAMP&gt;. The following table shows the available list of date literals, the ranges they represent, and examples:&lt;/P&gt;&lt;P class="colSort data" style="color: #000000; font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;TABLE cellpadding="4" cellspacing="0" class="featureTable sort_table" style="margin-top: 10px;" summary=""&gt;&lt;THEAD align="left" class="thead"&gt;&lt;TR class="row"&gt;&lt;TH class="featureTableHeader" colspan="1" rowspan="1" style="color: #ffffff; font-size: 13px; font-weight: bold; padding: 0.2em 6px; border: none; background-color: #737e96;" width="24%"&gt;Date Literal&lt;/TH&gt;&lt;TH class="featureTableHeader" colspan="1" rowspan="1" style="color: #ffffff; font-size: 13px; font-weight: bold; padding: 0.2em 6px; border: none; background-color: #737e96;" width="37.99999999999999%"&gt;Range&lt;/TH&gt;&lt;TH class="featureTableHeader" colspan="1" rowspan="1" style="color: #ffffff; font-size: 13px; font-weight: bold; padding: 0.2em 6px; border: none; background-color: #737e96;" width="37.99999999999999%"&gt;Example&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY class="tbody" style="background-color: #f3f3ec;"&gt;&lt;TR class="row"&gt;&lt;TD class="entry" colspan="1" headers="d18214e238" rowspan="1" style="font-size: 12px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e3deb8;" width="24%"&gt;&lt;SAMP class="nolang codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;YESTERDAY&lt;/SAMP&gt;&lt;/TD&gt;&lt;TD class="entry" colspan="1" headers="d18214e241" rowspan="1" style="font-size: 12px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e3deb8;" width="37.99999999999999%"&gt;Starts 12:00:00 the day before and continues for 24 hours.&lt;/TD&gt;&lt;TD class="entry" colspan="1" headers="d18214e244" rowspan="1" style="font-size: 12px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e3deb8;" width="37.99999999999999%"&gt;&lt;SAMP class="soql codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;SELECT Id FROM Account WHERE CreatedDate = YESTERDAY&lt;/SAMP&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="row"&gt;&lt;TD class="entry" colspan="1" headers="d18214e238" rowspan="1" style="font-size: 12px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e3deb8;" width="24%"&gt;&lt;SAMP class="nolang codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;TODAY&lt;/SAMP&gt;&lt;/TD&gt;&lt;TD class="entry" colspan="1" headers="d18214e241" rowspan="1" style="font-size: 12px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e3deb8;" width="37.99999999999999%"&gt;Starts 12:00:00 of the current day and continues for 24 hours.&lt;/TD&gt;&lt;TD class="entry" colspan="1" headers="d18214e244" rowspan="1" style="font-size: 12px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e3deb8;" width="37.99999999999999%"&gt;&lt;SAMP class="soql codeph" style="font-family: 'Courier New', Courier, monospace; font-size: 13px;"&gt;SELECT Id FROM Account WHERE CreatedDate &amp;gt; TODAY&lt;/SAMP&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 13:51:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Salesforce-SQL-select-not-in-future/m-p/804369#M665915</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-01-16T13:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Salesforce SQL select not in future</title>
      <link>https://community.qlik.com/t5/QlikView/Salesforce-SQL-select-not-in-future/m-p/804370#M665916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can use Today() in a SQL SELECT query.&amp;nbsp; Try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: #eeeeee;"&gt;WHERE ActivityDate = #" &amp;amp; format(Date,"mm/dd/yyyy") &amp;amp; "#"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 13:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Salesforce-SQL-select-not-in-future/m-p/804370#M665916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-16T13:58:11Z</dc:date>
    </item>
  </channel>
</rss>

