<?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 error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595728#M220679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Javier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL Function let you write code with the same syntax and functions as your Database would have, so that is a space where you make a query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2014 16:52:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-31T16:52:40Z</dc:date>
    <item>
      <title>SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595724#M220675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, what's wrong in this script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;[EBAN_W]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;ADD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; SQL &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT DISTINCT MATNR, TXZ01&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM EBAN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE Right(MATNR,1) = '4'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this scrpt works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;[EBAN_W]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;ADD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;LOAD *&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp; SQL &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT DISTINCT MATNR, TXZ01&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM EBAN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE MATNR = '4000000'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 16:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595724#M220675</guid>
      <dc:creator />
      <dc:date>2014-01-31T16:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595725#M220676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Javier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't use QlikView functions in WHERE clause of SQL query. This query is send to database thus only DBMS functions are supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lukasz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 16:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595725#M220676</guid>
      <dc:creator />
      <dc:date>2014-01-31T16:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595726#M220677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have this too, because our version of SQL doesn't deal with Right( function, only with substr.&lt;/P&gt;&lt;P&gt;Right(MATNR,1) is then translated into Substr(MATNR,Length(MATNR),1). This is in Oracle SQL.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 16:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595726#M220677</guid>
      <dc:creator />
      <dc:date>2014-01-31T16:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595727#M220678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably need something like SUBSTR(MANTR, -1) = '4' instead of RIGHT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 16:50:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595727#M220678</guid>
      <dc:creator />
      <dc:date>2014-01-31T16:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595728#M220679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Javier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL Function let you write code with the same syntax and functions as your Database would have, so that is a space where you make a query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 16:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595728#M220679</guid>
      <dc:creator />
      <dc:date>2014-01-31T16:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595729#M220680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Javier&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reply by &lt;EM&gt;Lukasz&lt;/EM&gt; is absolutely correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For SQL on Oracle [other brands of SQL may vary] you would need :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; SELECT DISTINCT MATNR, TXZ01&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM EBAN&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE &lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11px;"&gt;MATNR like '%4'&amp;nbsp; ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming I have understood correctly and need the last character to be 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Bill&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 16:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595729#M220680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-31T16:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595730#M220681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, This was the script, really I need the number that star with 4, and the functions Left, Rigth, don't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[EBAN_W]:&lt;/P&gt;&lt;P&gt;ADD&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SQL &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT DISTINCT MATNR, TXZ01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM EBAN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE MATNR LIKE '4%'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 17:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595730#M220681</guid>
      <dc:creator />
      <dc:date>2014-01-31T17:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: SQL error</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595731#M220682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It is important to mention that when you're extracting data from a Database, QlikView script can be divided in 2 segments:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SQL.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/52441_SQL.png" style="width: 620px; height: 109px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 17:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-error/m-p/595731#M220682</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-01-31T17:14:15Z</dc:date>
    </item>
  </channel>
</rss>

