<?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 &amp;quot;IN&amp;quot; operator format error with MongoDB ODBC connection query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2062925#M1223331</link>
    <description>&lt;P&gt;I am trying to query data from MongoDB database where column_1 is equal to a list of strings. I tried testing the following code on one string, but I get an error.&lt;/P&gt;
&lt;P&gt;[table_1]&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;SELECT &lt;BR /&gt;[column_1],&lt;BR /&gt;FROM db&lt;BR /&gt;WHERE column_1 IN ('value_x-1') &lt;BR /&gt;;&lt;/P&gt;
&lt;DIV class="headline edc_error"&gt;The following error occurred:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;ERROR [HY000] [Qlik][MongoDBODBC] (110) Error from MongoDB Client: Badly formed input data (Error Code: 9)&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;The query works fine if I filter a numeric column (e.g., WHERE column_2 = 0), so clearly the way I am formatting the WHERE IN clause is wrong. Any ideas?&lt;/DIV&gt;</description>
    <pubDate>Fri, 21 Apr 2023 08:30:46 GMT</pubDate>
    <dc:creator>prayner</dc:creator>
    <dc:date>2023-04-21T08:30:46Z</dc:date>
    <item>
      <title>"IN" operator format error with MongoDB ODBC connection query</title>
      <link>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2062925#M1223331</link>
      <description>&lt;P&gt;I am trying to query data from MongoDB database where column_1 is equal to a list of strings. I tried testing the following code on one string, but I get an error.&lt;/P&gt;
&lt;P&gt;[table_1]&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;SELECT &lt;BR /&gt;[column_1],&lt;BR /&gt;FROM db&lt;BR /&gt;WHERE column_1 IN ('value_x-1') &lt;BR /&gt;;&lt;/P&gt;
&lt;DIV class="headline edc_error"&gt;The following error occurred:&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;ERROR [HY000] [Qlik][MongoDBODBC] (110) Error from MongoDB Client: Badly formed input data (Error Code: 9)&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="edc_error"&gt;The query works fine if I filter a numeric column (e.g., WHERE column_2 = 0), so clearly the way I am formatting the WHERE IN clause is wrong. Any ideas?&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Apr 2023 08:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2062925#M1223331</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-04-21T08:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" operator format error with MongoDB ODBC connection query</title>
      <link>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2062994#M1223333</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; have you already tried this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Where column_1 = 'value_x-1';&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Alternatively, by using the where clause in the load statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[table_1]:
LOAD *
Where Match(column_1,'Value_x-1');
SELECT
[column_1],
FROM db;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 21 Apr 2023 10:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2062994#M1223333</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-04-21T10:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" operator format error with MongoDB ODBC connection query</title>
      <link>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2063005#M1223334</link>
      <description>&lt;P&gt;It worked when I used LIKE instead of IN.&lt;/P&gt;
&lt;P&gt;There are millions of rows so putting WHERE as load statement would be too slow.&lt;/P&gt;
&lt;P&gt;Issue now is that I don't know how to format the query so that LIKE accepts multiple values:&lt;/P&gt;
&lt;P&gt;e.g., WHERE column_1 LIKE ('value_x-1', 'value_x-1')&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 11:22:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2063005#M1223334</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-04-21T11:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" operator format error with MongoDB ODBC connection query</title>
      <link>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2063012#M1223335</link>
      <description>&lt;P&gt;I believe Qlik does not run SQL itself, It only receives the results after the query is transferred. It could probably be the db settings.&lt;/P&gt;
&lt;P&gt;Anyways, you can try this for multiple values.&lt;/P&gt;
&lt;P&gt;Where column_1 Like 'value_x-1' or column_1 Like '&lt;STRONG&gt;&lt;FONT color="#000000"&gt;anotherValue&lt;/FONT&gt;&lt;/STRONG&gt;';&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 09:41:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2063012#M1223335</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2023-04-22T09:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: "IN" operator format error with MongoDB ODBC connection query</title>
      <link>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2063790#M1223367</link>
      <description>&lt;P&gt;Thanks for getting back to me. This solution didn't work either. &lt;BR /&gt;Error: ERROR [HY000] [Qlik][MongoDBODBC] (110) Error from MongoDB Client: Failed to send "find" command with database "insDB": Failed to read 4 bytes: socket error or timeout (Error Code: 4)&lt;BR /&gt;&lt;BR /&gt;The issue with "LIKE ... OR ..." is that I am feeding new values and unpredictable number of distinct values from column_1, I would need this function to be dynamic.&lt;/P&gt;
&lt;P&gt;The "WHERE ... IN ..." clause is ideal, but I still don't know why that isn't working. It seems likely to be related to MongoDB, so I am going to test it directly in MongoDB.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 15:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-IN-quot-operator-format-error-with-MongoDB-ODBC-connection/m-p/2063790#M1223367</guid>
      <dc:creator>prayner</dc:creator>
      <dc:date>2023-04-24T15:37:34Z</dc:date>
    </item>
  </channel>
</rss>

