<?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: Redshift ODBC - error when using WITH clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Redshift-ODBC-error-when-using-WITH-clause/m-p/1034780#M348961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved.&lt;/P&gt;&lt;P&gt;I forgot the &lt;STRONG&gt;SQL &lt;/STRONG&gt; prefix before the actual SQL statement.&lt;/P&gt;&lt;P&gt;I usually omit this prefix and queries run just fine. Turns out that &lt;STRONG&gt;WITH&lt;/STRONG&gt; needs that prefix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following syntax will work:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WITH &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[table_name] as (select col1 from t1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select col1 from table_name&lt;/STRONG&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jan 2016 10:00:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-01-20T10:00:59Z</dc:date>
    <item>
      <title>Redshift ODBC - error when using WITH clause</title>
      <link>https://community.qlik.com/t5/QlikView/Redshift-ODBC-error-when-using-WITH-clause/m-p/1034779#M348960</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;This is probably a Redshift IDBC driver issue, but thought maybe someone here has also encountered the problem.&lt;/P&gt;&lt;P&gt;I'm pulling data into QlikView from Amazon Redshift using the latest x64 ODBC driver (&lt;A href="http://docs.aws.amazon.com/redshift/latest/mgmt/install-odbc-driver-windows.html" title="http://docs.aws.amazon.com/redshift/latest/mgmt/install-odbc-driver-windows.html"&gt;Install and Configure the Amazon Redshift ODBC Driver on Microsoft Windows Operating Systems - Amazon Redshift&lt;/A&gt;),&lt;/P&gt;&lt;P&gt;and when I'm trying to use the &lt;STRONG&gt;WITH clause&lt;/STRONG&gt; (&lt;A href="http://docs.aws.amazon.com/redshift/latest/dg/r_WITH_clause.html" title="http://docs.aws.amazon.com/redshift/latest/dg/r_WITH_clause.html"&gt;WITH Clause - Amazon Redshift&lt;/A&gt;), I get an &lt;STRONG&gt;unkown statement error&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know the query's syntax correct since it executes fine when running it via any client like datagrip / sql workbench j.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody encountered this problem before and managed to solve it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Assaf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 09:16:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Redshift-ODBC-error-when-using-WITH-clause/m-p/1034779#M348960</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-20T09:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Redshift ODBC - error when using WITH clause</title>
      <link>https://community.qlik.com/t5/QlikView/Redshift-ODBC-error-when-using-WITH-clause/m-p/1034780#M348961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved.&lt;/P&gt;&lt;P&gt;I forgot the &lt;STRONG&gt;SQL &lt;/STRONG&gt; prefix before the actual SQL statement.&lt;/P&gt;&lt;P&gt;I usually omit this prefix and queries run just fine. Turns out that &lt;STRONG&gt;WITH&lt;/STRONG&gt; needs that prefix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following syntax will work:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WITH &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[table_name] as (select col1 from t1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select col1 from table_name&lt;/STRONG&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 10:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Redshift-ODBC-error-when-using-WITH-clause/m-p/1034780#M348961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-20T10:00:59Z</dc:date>
    </item>
  </channel>
</rss>

