<?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: Incorrect SQL generated by Configurable ODBC Directory Service Connector in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incorrect-SQL-generated-by-Configurable-ODBC-Directory-Service/m-p/272076#M1321172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is intended - The QV_ENTITY table contains both groups and users and then the QV_ROLES table is essentially a bridge from QV_ENTITY to itself, containg the entityid of the user (aliased as memberid) and group (aliased as groupid). So a join on QV_ENTITY.entityid = QV_ROLES.groupid will just return a row for each member of each group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presumably this query is performed so you can search for group names as well as usernames - If noGroupMembers = 0 then it will just return the details for the username searched for, otherwise it performs another query to find details for all the users in the group name searched for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a slightly confusing data model, having to join on fields with different names, but it works fine when it generates the right sql. It just needs to either preserve the case of the search string (which it did in QV10...) or do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;...&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lower(e.name) = 'actohe01'&lt;BR /&gt;OR lower(e.descr) = 'actohe01'&lt;BR /&gt;...&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Feb 2012 09:33:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-10T09:33:02Z</dc:date>
    <item>
      <title>Incorrect SQL generated by Configurable ODBC Directory Service Connector</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SQL-generated-by-Configurable-ODBC-Directory-Service/m-p/272074#M1321167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; Hello,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I was just wondering if anybody else had encountered this problem or devised a workaround. In QV10, when searching for a user in QEMC such as 'ACTOHE01', the generated SQL would be as follows:&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SELECT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.entityid,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.NAME,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.descr,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.email,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; COUNT(g.memberid) AS noGroupMembers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; QV_ENTITY e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LEFT JOIN QV_ROLES g&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ON&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.entityid=g.groupid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.NAME = 'ACTOHE01'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GROUP BY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.entityid,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.NAME,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.descr,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.email &lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;However when I perform the same search in QV11 QMC, the following SQL is generated:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;SELECT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.entityid,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.NAME,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.descr,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.email,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; COUNT(g.memberid) AS noGroupMembers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FROM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; QV_ENTITY e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LEFT JOIN QV_ROLES g&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ON&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.entityid=g.groupid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;WHERE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.NAME&amp;nbsp;&amp;nbsp; = 'actohe01'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OR e.descr = 'actohe01'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;OR e.NAME&amp;nbsp; = 'actohe01'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;GROUP BY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.entityid,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.NAME,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.descr,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; e.email&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;This may seem like a trivial difference, however string comparisons in Oracle are case-sensitive so this second query does not return any results. It seems like whatever you search for, the generated SQL will have your search string in all lower case. Since all of our user and group names are in upper case, it is impossible to look up users in our DSP in QMC at all, making it hard to manually add user CALs, examine which documents a user has DMS authorisation for, etc.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Has anybody else encountered the same issue?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Kind regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Michael.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SQL-generated-by-Configurable-ODBC-Directory-Service/m-p/272074#M1321167</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Incorrect SQL generated by Configurable ODBC Directory Service Connector</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SQL-generated-by-Configurable-ODBC-Directory-Service/m-p/272075#M1321169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also observed something odd.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the documentation, I would expect groupid should be the unique identifier of the group and memberid would be the unique identifier for the user (entityid) from the entities table.&amp;nbsp; Yet the QV_ENTITY table is being joined to the QV_ROLES table (in your example and similarly in my environment) using QV_ENTITY.entityid = QV_ROLES.groupid.&amp;nbsp; This will produce some interesting results, if any at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 03:52:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SQL-generated-by-Configurable-ODBC-Directory-Service/m-p/272075#M1321169</guid>
      <dc:creator />
      <dc:date>2012-02-10T03:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SQL generated by Configurable ODBC Directory Service Connector</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SQL-generated-by-Configurable-ODBC-Directory-Service/m-p/272076#M1321172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is intended - The QV_ENTITY table contains both groups and users and then the QV_ROLES table is essentially a bridge from QV_ENTITY to itself, containg the entityid of the user (aliased as memberid) and group (aliased as groupid). So a join on QV_ENTITY.entityid = QV_ROLES.groupid will just return a row for each member of each group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Presumably this query is performed so you can search for group names as well as usernames - If noGroupMembers = 0 then it will just return the details for the username searched for, otherwise it performs another query to find details for all the users in the group name searched for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a slightly confusing data model, having to join on fields with different names, but it works fine when it generates the right sql. It just needs to either preserve the case of the search string (which it did in QV10...) or do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;...&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lower(e.name) = 'actohe01'&lt;BR /&gt;OR lower(e.descr) = 'actohe01'&lt;BR /&gt;...&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2012 09:33:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SQL-generated-by-Configurable-ODBC-Directory-Service/m-p/272076#M1321172</guid>
      <dc:creator />
      <dc:date>2012-02-10T09:33:02Z</dc:date>
    </item>
  </channel>
</rss>

