<?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: Executing query from Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372452#M419250</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realize that this is an old post but I think it might be good for others that see this question to get some guidance on the issue....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The query that will be sent to SQL Server has to be between a SQL and a semicolon. Everything between the SQL and the ; will be sent to SQL Server via the driver (most often ODBC) that the CONNECT statement in the load script use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;So having a semicolon in the middle of the query is not going to work well.&lt;/LI&gt;&lt;LI&gt;The semicolon in the middle of the query does not seem to be part of a SQL Server T-SQL syntax. It is most certainly something that a query tool would accept as a separator between SQL statements that can be sent to SQL Server. Each SQL specification in a Qlik load script has to contain one and only one SQL statement.&lt;/LI&gt;&lt;LI&gt;The query being sent should probably look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; WITH XMLNAMESPACES ( '&lt;A class="jive-link-external-small" href="http://www.XXname.com/ConcurSaeExtract" rel="nofollow" target="_blank"&gt;http://www.XXname.com/ConcurSaeExtract&lt;/A&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;' AS xx) &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAST(EVENT_PAYLOAD.query('data(/xx:SAE-RECORD/xx:BATCH_ID)') as varchar(250)) BATCH_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,record_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,creation_date&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,processed_flag&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,event_type&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; FROM uat_mulesoft_sql.dbo.HOLX_MULE_EVENT_Q&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; WHERE &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1=1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt; AND EVENT_TYPE = 'EXPENSE_GL'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; --AND&lt;/STRONG&gt; CREATION_DATE &amp;gt; GETDATE() - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #339966;"&gt;&lt;STRONG&gt;&amp;nbsp; FOR XML &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;PATH('xx:root')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The last line has been added and and it might be necessary with a different specification after FOR XML. A semicolon has been remove between the WITH..... and the SELECT. According to Microsoft documentation it shouldn't be any semicolons between a WITH and the following SELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2018 06:16:37 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2018-04-17T06:16:37Z</dc:date>
    <item>
      <title>Executing query from Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372447#M419245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a below query which I am executing from SQL server, it is running fine from there but when I try to execute the same from&lt;/P&gt;&lt;P&gt;Qlik it is throwing error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WITH XMLNAMESPACES ( &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; '&lt;/SPAN&gt;&lt;A class="jive-link-external-small unlinked" rel="nofollow" target="_blank"&gt;http://www.XXname.com/ConcurSaeExtract&lt;/A&gt;&lt;SPAN&gt;' AS xx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&lt;/P&gt;&lt;P&gt;&amp;nbsp; CAST(EVENT_PAYLOAD.query('data(/xx:SAE-RECORD/xx:BATCH_ID)') as varchar(250)) BATCH_ID,&lt;/P&gt;&lt;P&gt;record_id&lt;/P&gt;&lt;P&gt;,creation_date&lt;/P&gt;&lt;P&gt;,processed_flag&lt;/P&gt;&lt;P&gt;,event_type&lt;/P&gt;&lt;P&gt;from uat_mulesoft_sql.dbo.HOLX_MULE_EVENT_Q&lt;/P&gt;&lt;P&gt;where 1=1&lt;/P&gt;&lt;P&gt;and EVENT_TYPE = 'EXPENSE_GL'&lt;/P&gt;&lt;P&gt;--and CREATION_DATE &amp;gt; GETDATE() - 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main problem is with the first part "With XML Namespace" and the "Cast function"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas will help me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 09:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372447#M419245</guid>
      <dc:creator>kkkumar82</dc:creator>
      <dc:date>2017-08-09T09:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Executing query from Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372448#M419246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For cast function please read below thread &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlikview.com/thread/29580" title="https://community.qlikview.com/thread/29580"&gt;Replacement of CAST function in QlikView! | Qlik Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/200760"&gt;how to use count and cast functions in qlikview&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 09:59:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372448#M419246</guid>
      <dc:creator>prma7799</dc:creator>
      <dc:date>2017-08-09T09:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Executing query from Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372449#M419247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, but the column EventPayload contains all these values for eg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;xx:SAE-RECORD xmlns:xx="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.hologic.com/ConcurSaeExtract" rel="nofollow" target="_blank"&gt;http://www.hologic.com/ConcurSaeExtract&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;xx:CONSTANT&amp;gt;DETAIL&amp;lt;/xx:CONSTANT&amp;gt;&amp;lt;xx:BATCH_ID&amp;gt;811&amp;lt;/xx:BATCH_ID&amp;gt;&amp;lt;xx:BATCH_DATE&amp;gt;2017-06-20&amp;lt;/xx:BATCH_DATE&amp;gt;&amp;lt;xx:SEQUENCE_NUMBER&amp;gt;1&amp;lt;/xx:SEQUENCE_NUMBER&amp;gt;&amp;lt;xx:EMPLOYEE_ID&amp;gt;001192&amp;lt;/xx:EMPLOYEE_ID&amp;gt;&amp;lt;xx:EMPLOYEE_LAST_NAME&amp;gt;BRUCE&amp;lt;/xx:EMPLOYEE_LAST_NAME&amp;gt;&amp;lt;xx:EMPLOYEE_FIRST_NAME&amp;gt;KATHY&amp;lt;/xx:EMPLOYEE_FIRST_NAME&amp;gt;&amp;lt;xx:MI/&amp;gt;&amp;lt;xx:EMPLOYEE_GROUP_ID&amp;gt;Non-VP US&amp;lt;/xx:EMPLOYEE_GROUP_ID&amp;gt;&amp;lt;xx:EMPLOYEE_ORG_UNIT_1&amp;gt;01&amp;lt;/xx:EMPLOYEE_ORG_UNIT_1&amp;gt;&amp;lt;xx:EMPLOYEE_ORG_UNIT_2&amp;gt;200&amp;lt;/xx:EMPLOYEE_ORG_UNIT_2&amp;gt;&amp;lt;xx:EMPLOYEE_ORG_UNIT_3&amp;gt;2600&amp;lt;/xx:EMPLOYEE_ORG_UNIT_3&amp;gt;&amp;lt;xx:EMPLOYEE_ORG_UNIT_4&amp;gt;0200&amp;lt;/xx:EMPLOYEE_ORG_UNIT_4&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to extract the values from the columns we use that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 10:38:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372449#M419247</guid>
      <dc:creator>kkkumar82</dc:creator>
      <dc:date>2017-08-09T10:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Executing query from Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372450#M419248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the links but they couldn't help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 11:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372450#M419248</guid>
      <dc:creator>kkkumar82</dc:creator>
      <dc:date>2017-08-09T11:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Executing query from Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372451#M419249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try SQL keyword in the start and you will be all good, I had the same issue, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just adding the SQL keyword helpeme to execute the total block.&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;&lt;STRONG style="text-decoration: underline;"&gt;SQL&lt;/STRONG&gt; WITH XMLNAMESPACES (&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="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; '&lt;/SPAN&gt;&lt;A class="unlinked jive-link-external-small" rel="nofollow" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;" target="_blank"&gt;http://www.XXname.com/ConcurSaeExtract&lt;/A&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;' AS xx&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;&amp;nbsp;&amp;nbsp; );&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;select&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; CAST(EVENT_PAYLOAD.query('data(/xx:SAE-RECORD/xx:BATCH_ID)') as varchar(250)) BATCH_ID,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;record_id&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,creation_date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,processed_flag&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,event_type&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;from uat_mulesoft_sql.dbo.HOLX_MULE_EVENT_Q&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where 1=1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and EVENT_TYPE = 'EXPENSE_GL'&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;--and CREATION_DATE &amp;gt; GETDATE() - 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 23:57:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372451#M419249</guid>
      <dc:creator>deepakqsv</dc:creator>
      <dc:date>2018-04-16T23:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Executing query from Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372452#M419250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realize that this is an old post but I think it might be good for others that see this question to get some guidance on the issue....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The query that will be sent to SQL Server has to be between a SQL and a semicolon. Everything between the SQL and the ; will be sent to SQL Server via the driver (most often ODBC) that the CONNECT statement in the load script use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;So having a semicolon in the middle of the query is not going to work well.&lt;/LI&gt;&lt;LI&gt;The semicolon in the middle of the query does not seem to be part of a SQL Server T-SQL syntax. It is most certainly something that a query tool would accept as a separator between SQL statements that can be sent to SQL Server. Each SQL specification in a Qlik load script has to contain one and only one SQL statement.&lt;/LI&gt;&lt;LI&gt;The query being sent should probably look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; WITH XMLNAMESPACES ( '&lt;A class="jive-link-external-small" href="http://www.XXname.com/ConcurSaeExtract" rel="nofollow" target="_blank"&gt;http://www.XXname.com/ConcurSaeExtract&lt;/A&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;' AS xx) &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAST(EVENT_PAYLOAD.query('data(/xx:SAE-RECORD/xx:BATCH_ID)') as varchar(250)) BATCH_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,record_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,creation_date&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,processed_flag&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,event_type&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; FROM uat_mulesoft_sql.dbo.HOLX_MULE_EVENT_Q&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; WHERE &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1=1&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt; AND EVENT_TYPE = 'EXPENSE_GL'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; --AND&lt;/STRONG&gt; CREATION_DATE &amp;gt; GETDATE() - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="color: #339966;"&gt;&lt;STRONG&gt;&amp;nbsp; FOR XML &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;PATH('xx:root')&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;The last line has been added and and it might be necessary with a different specification after FOR XML. A semicolon has been remove between the WITH..... and the SELECT. According to Microsoft documentation it shouldn't be any semicolons between a WITH and the following SELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 06:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Executing-query-from-Qlikview/m-p/1372452#M419250</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-04-17T06:16:37Z</dc:date>
    </item>
  </channel>
</rss>

