<?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: SQL Command not ended properly error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993184#M646402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried that, &lt;SPAN style="font-size: 13.3333px;"&gt;WHERE Datetime(LAST_UPDATE_DATETIME) &amp;gt;='10/28/2015 5:22:05 PM'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;but getting the below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL##f - SqlState: S0022, ErrorCode: 904, ErrorMsg: [Oracle][ODBC][Ora]ORA-00904: "DATETIME": invalid identifier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2015 16:37:44 GMT</pubDate>
    <dc:creator>markgraham123</dc:creator>
    <dc:date>2015-10-29T16:37:44Z</dc:date>
    <item>
      <title>SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993181#M646399</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 have a filed "Updated TimedAte" in my qvd&lt;/P&gt;&lt;P&gt;I wanna do incremental update using this filed but i was not able to .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD max(Timestamp((LAST_UPDATE_DATETIME)) as maxdate FROM 1.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vInc = 'WHERE Datetime(LAST_UPDATE_DATETIME) &amp;gt;=' &amp;amp; Peek('maxdate');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL Select * from Table where &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Last Updated Date Time &amp;gt;= $(vInc);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993181#M646399</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-10-29T16:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993182#M646400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vInc in its entirety is being substituted in to your SQL query, resulting in this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from Table where &lt;SPAN style="font-family: inherit; font-size: 13.33px; font-style: inherit; font-weight: inherit;"&gt;Last Updated Date Time &amp;gt;= WHERE Datetime(LAST_UPDATE_DATETIME) &amp;gt;=[MaxDate];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 13.33px; font-style: inherit; font-weight: inherit;"&gt;Change your vInc declaration to &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 13.33px; font-style: inherit; font-weight: inherit;"&gt;LET vInc = chr(39) &amp;amp;&amp;nbsp; Peek('maxdate') &amp;amp; chr(39);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993182#M646400</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-10-29T16:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993183#M646401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LET vInc = 'WHERE Datetime(LAST_UPDATE_DATETIME) &amp;gt;=' &amp;amp; Peek('maxdate');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I feel this looks incorrect to me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:37:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993183#M646401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-29T16:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993184#M646402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried that, &lt;SPAN style="font-size: 13.3333px;"&gt;WHERE Datetime(LAST_UPDATE_DATETIME) &amp;gt;='10/28/2015 5:22:05 PM'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;but getting the below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL##f - SqlState: S0022, ErrorCode: 904, ErrorMsg: [Oracle][ODBC][Ora]ORA-00904: "DATETIME": invalid identifier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:37:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993184#M646402</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-10-29T16:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993185#M646403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just change your vInc declaration to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 13.33px; font-style: inherit; font-weight: inherit;"&gt;LET vInc = chr(39) &amp;amp;&amp;nbsp; Peek('maxdate') &amp;amp; chr(39);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 13.33px; font-style: inherit; font-weight: inherit;"&gt;The error you got implies that you have DATETIME in your final query. If you had followed my recommendation that wouldn't be the case.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 13.33px; font-style: inherit; font-weight: inherit;"&gt;Marcus&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993185#M646403</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-10-29T16:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993186#M646404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed:&lt;/P&gt;&lt;P&gt;LET vInc = chr(39) &amp;amp;&amp;nbsp; Peek('maxdate') &amp;amp; chr(39);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FInal statement is:&lt;/P&gt;&lt;P&gt;FROM $(vDataSource) where LAST_UPDATE_DATETIME &amp;gt;= $(vInc);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;ErrorMsg: [Oracle][ODBC][Ora]ORA-01843: not a valid month&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993186#M646404</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-10-29T16:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993187#M646405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The field is of timestamp,&lt;/P&gt;&lt;P&gt;Can you help me getting right format??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993187#M646405</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-10-29T16:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993188#M646406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so what do you see in your QVW's log file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing that might help is to amend the declaration to:&lt;/P&gt;&lt;P&gt;LET vInc = chr(39) &amp;amp;&amp;nbsp; Date#(Peek('maxdate'), 'YYYY-MM-DD hh:mm:ss') &amp;amp; chr(39);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993188#M646406</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2015-10-29T16:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993189#M646407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxDate:&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; date(max($(vDateField)),'YYYY-MM-DD') as MaxDate&lt;/P&gt;&lt;P&gt;&amp;nbsp; From $(vQvdPath)$(vTable).qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let vMaxDate = Peek('MaxDate',0,'MaxDate');&lt;/P&gt;&lt;P&gt;&amp;nbsp; DROP Table MaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also try this &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9531"&gt;Incremental Load in Qlikview - Sources&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:53:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993189#M646407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-29T16:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Command not ended properly error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993190#M646408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i try &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LET vInc = chr(39) &amp;amp;&amp;nbsp; Date#(Peek('maxdate'), 'YYYY-MM-DD hh:mm:ss') &amp;amp; chr(39);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I see&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"literal does not match format string"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 16:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Command-not-ended-properly-error/m-p/993190#M646408</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-10-29T16:54:19Z</dc:date>
    </item>
  </channel>
</rss>

