<?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 Where statement in odbc load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549197#M205146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use a where clause in my script for loading through ODBC, so I can restrict the size of the QVD files that I'll later load. &lt;/P&gt;&lt;P&gt;My where clause works in the transformation step from QVD to QVW, but it does not work in the script that connects to ODBC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a similar question that wasn't answered yet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/290620#290620"&gt;http://community.qlik.com/message/290620&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? I'm trying to avoid a workaround with preceding load because that will make the script unnecessarily complex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forgot my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOBS:&lt;/P&gt;&lt;P&gt;//FIRST 10000&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;"A_BEHAVIOUR" AS "JOB0_A_BEHAVIOUR",&lt;/P&gt;&lt;P&gt;"A_CHILDJOBS" AS "JOB0_A_CHILDJOBS",&lt;/P&gt;&lt;P&gt;"A_CHILDORDER" AS "JOB0_A_CHILDORDER",&lt;/P&gt;&lt;P&gt;DATEADD(MILLISECOND, "A_CREATIONTIMETS" % 1000, DATEADD(SECOND, "A_CREATIONTIMETS" / 1000, '19700101')) AS "JOB0_A_CREATIONTIMETS_DATE"&lt;/P&gt;&lt;P&gt;FROM DBxxxxx.dbo."JCS_JOB0" Where not (Len(trim(purgechar(A_BEHAVIOUR, chr(160))))=0 and JOB0_F_JOBCHAINSTEP&amp;gt;0 and JOB0_A_BEHAVIOUR = '2');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jul 2013 08:12:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-07-08T08:12:55Z</dc:date>
    <item>
      <title>Where statement in odbc load</title>
      <link>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549197#M205146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use a where clause in my script for loading through ODBC, so I can restrict the size of the QVD files that I'll later load. &lt;/P&gt;&lt;P&gt;My where clause works in the transformation step from QVD to QVW, but it does not work in the script that connects to ODBC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a similar question that wasn't answered yet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/290620#290620"&gt;http://community.qlik.com/message/290620&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? I'm trying to avoid a workaround with preceding load because that will make the script unnecessarily complex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forgot my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOBS:&lt;/P&gt;&lt;P&gt;//FIRST 10000&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;"A_BEHAVIOUR" AS "JOB0_A_BEHAVIOUR",&lt;/P&gt;&lt;P&gt;"A_CHILDJOBS" AS "JOB0_A_CHILDJOBS",&lt;/P&gt;&lt;P&gt;"A_CHILDORDER" AS "JOB0_A_CHILDORDER",&lt;/P&gt;&lt;P&gt;DATEADD(MILLISECOND, "A_CREATIONTIMETS" % 1000, DATEADD(SECOND, "A_CREATIONTIMETS" / 1000, '19700101')) AS "JOB0_A_CREATIONTIMETS_DATE"&lt;/P&gt;&lt;P&gt;FROM DBxxxxx.dbo."JCS_JOB0" Where not (Len(trim(purgechar(A_BEHAVIOUR, chr(160))))=0 and JOB0_F_JOBCHAINSTEP&amp;gt;0 and JOB0_A_BEHAVIOUR = '2');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549197#M205146</guid>
      <dc:creator />
      <dc:date>2013-07-08T08:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement in odbc load</title>
      <link>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549198#M205147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use Qlikview functions in an SQL Select statement. The sql statement is executed by the database server, not Qlikview. So you need to replace&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt; (Len(trim(purgechar(A_BEHAVIOUR, chr(160))))=0&lt;/SPAN&gt; with something that's valid sql for your database. Ask your local friendly database administrator if you need help with that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549198#M205147</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-07-08T08:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement in odbc load</title>
      <link>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549199#M205148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, your where clause will only work in a Load, e.g in a preceding load. It will not work in a SELECT. The SELECT statement is not evaluated by QlikVIew. It is evaluated by the ODBC driver,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:22:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549199#M205148</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-07-08T08:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement in odbc load</title>
      <link>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549200#M205149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are trying to use qlikview functions in your SQL query.. that is why you are getting issues in where clause..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to load this table without where clause and use resident load and then put the where condition having qlikview functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:23:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549200#M205149</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2013-07-08T08:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement in odbc load</title>
      <link>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549201#M205150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Purgechar() work in QlikView and I don't think it work in ODBC. Let try this query&lt;/P&gt;&lt;P&gt;Where not (Len(Trim(Replace(A,Chr(160),'')))=0 and JOB0_F_JOBCHAINSTEP&amp;gt;0 and JOB0_A_BEHAVIOUR = '2');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:28:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-statement-in-odbc-load/m-p/549201#M205150</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2013-07-08T08:28:02Z</dc:date>
    </item>
  </channel>
</rss>

