<?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 SQL common table expression works qvw on desktop, but not in Publisher in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-common-table-expression-works-qvw-on-desktop-but-not-in/m-p/632928#M1300091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a qvw that uses a common table expression in sql.&amp;nbsp; The common table expression begins with "with cte as (select x,y,z from table) "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script executes on my desktop but fails when running it on Publisher. The log file shows a SQL error, saying the "with statement is required to be preceded by a semicolon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know of a number of ways to re write the sql to avoid the cte.&amp;nbsp; I also could store the sql as a variable or even call it as a stored procedure.&amp;nbsp; My question is -- why does it work on my desktop but fail on Publisher?&amp;nbsp; I've checked the SQL drivers on the publisher server and they seem fine, the same as are installed on my desktop.&amp;nbsp;&amp;nbsp; Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2026-01-26T18:19:17Z</dc:date>
    <item>
      <title>SQL common table expression works qvw on desktop, but not in Publisher</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-common-table-expression-works-qvw-on-desktop-but-not-in/m-p/632928#M1300091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a qvw that uses a common table expression in sql.&amp;nbsp; The common table expression begins with "with cte as (select x,y,z from table) "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script executes on my desktop but fails when running it on Publisher. The log file shows a SQL error, saying the "with statement is required to be preceded by a semicolon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know of a number of ways to re write the sql to avoid the cte.&amp;nbsp; I also could store the sql as a variable or even call it as a stored procedure.&amp;nbsp; My question is -- why does it work on my desktop but fail on Publisher?&amp;nbsp; I've checked the SQL drivers on the publisher server and they seem fine, the same as are installed on my desktop.&amp;nbsp;&amp;nbsp; Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-common-table-expression-works-qvw-on-desktop-but-not-in/m-p/632928#M1300091</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL common table expression works qvw on desktop, but not in Publisher</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-common-table-expression-works-qvw-on-desktop-but-not-in/m-p/632929#M1300096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Verify the Qlikview Version in this two systens.&lt;/P&gt;&lt;P&gt;Try to run Qlikview Desktop with service account of Qlikview Distribution Services and analyze if this problem still hapening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same syntax is used by Qlikview Destkop and Qlikview Publisher.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 19:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-common-table-expression-works-qvw-on-desktop-but-not-in/m-p/632929#M1300096</guid>
      <dc:creator>Ricardo_Gerhard</dc:creator>
      <dc:date>2014-05-29T19:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL common table expression works qvw on desktop, but not in Publisher</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-common-table-expression-works-qvw-on-desktop-but-not-in/m-p/632930#M1300101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there some conditional code immediately before the WITH CTE AS... part that expands to something wrong (like a SQL statement without semicolon) on the QlikView server (but does not in your Desktop)? Although a semicolon isn't strictly required in T-SQL up until SQL Server 2014, some SQL statements don't like to be glued together as that may lead to ambiguous code. Just an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best thing you can do is post the offending part of your script. Please do add the part before the WITH CTE AS line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 06:22:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-common-table-expression-works-qvw-on-desktop-but-not-in/m-p/632930#M1300101</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-06-02T06:22:56Z</dc:date>
    </item>
  </channel>
</rss>

