2 Replies Latest reply: Jun 2, 2014 2:22 AM by Peter Cammaert RSS

    SQL common table expression works qvw on desktop, but not in Publisher

    Tim Ackerman

      I have a qvw that uses a common table expression in sql.  The common table expression begins with "with cte as (select x,y,z from table) "


      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.


      I know of a number of ways to re write the sql to avoid the cte.  I also could store the sql as a variable or even call it as a stored procedure.  My question is -- why does it work on my desktop but fail on Publisher?  I've checked the SQL drivers on the publisher server and they seem fine, the same as are installed on my desktop.   Any ideas?