<?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>question Re: Unable to query sys_choice table via ODBC in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662696#M319622</link>
    <description>&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;When I login to SNOW using the account I created specifically for ODBC (role soap_query was given to this account), I am not able to see sys_choice.list table at all.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;When I login to SNOW using other admin account I see data in all the columns in sys_Choice.list.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The ODBC driver version is : 1.0.9 64-bit&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I had never used ISQL query before. I am using SQL Server Management Studio (SSMS) to run my queries. I tried using ISQL today. But it doesn't work even for the Incident table (Incident table works for me when I query via SSMS). In ISQL it says 'You are not connected to any database.' I am using the correct connect syntax I believe: connect &lt;A title="ername*password@Service" href="mailto:username*password@Service"&gt;username*password@Service&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 25 Nov 2015 08:15:56 GMT</pubDate>
    <dc:creator>hemant10</dc:creator>
    <dc:date>2015-11-25T08:15:56Z</dc:date>
    <item>
      <title>Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662694#M319620</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am relatively new to SNOW. I was trying to connect to SNOW database via ODBC. The idea is to pull data into a local SQL Server database.&lt;/P&gt;&lt;P&gt;I was successfully able to create a linked server and connect to the SNOW db. I am also able to query the Incident and few other tables successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I try to query the sys_choice table, I get NULL data for most of the columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help here? IS there anything special about the sys_choice table?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 11:05:52 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662694#M319620</guid>
      <dc:creator>hemant10</dc:creator>
      <dc:date>2015-11-24T11:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662695#M319621</link>
      <description>&lt;P&gt;Hi Hemant,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;You could try a couple of things to get some insight.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If you log in to the instance and carry out a sys_choice.list, do you see data in all the columns?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If you run an ISQL query against sys_choice what do you see?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Finally what version of ODBC driver do you have deployed?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Nov 2015 12:40:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662695#M319621</guid>
      <dc:creator>tony_barratt</dc:creator>
      <dc:date>2015-11-24T12:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662696#M319622</link>
      <description>&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;When I login to SNOW using the account I created specifically for ODBC (role soap_query was given to this account), I am not able to see sys_choice.list table at all.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;When I login to SNOW using other admin account I see data in all the columns in sys_Choice.list.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The ODBC driver version is : 1.0.9 64-bit&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I had never used ISQL query before. I am using SQL Server Management Studio (SSMS) to run my queries. I tried using ISQL today. But it doesn't work even for the Incident table (Incident table works for me when I query via SSMS). In ISQL it says 'You are not connected to any database.' I am using the correct connect syntax I believe: connect &lt;A title="ername*password@Service" href="mailto:username*password@Service"&gt;username*password@Service&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2015 08:15:56 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662696#M319622</guid>
      <dc:creator>hemant10</dc:creator>
      <dc:date>2015-11-25T08:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662697#M319623</link>
      <description>&lt;P&gt;Hi Hemant,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;It seems likely your user cannot read the sys_choice table.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;ISQL is another issue.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Check this out to fix &amp;nbsp; the "your user cannot read the sys_choice table" issue.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="http://wiki.servicenow.com/index.php?title=Getting_Started_with_ODBC#Set_User_Permissions" title="http://wiki.servicenow.com/index.php?title=Getting_Started_with_ODBC#Set_User_Permissions"&gt;Getting Started with ODBC - ServiceNow Wiki&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;&lt;H2 style="border-top-style: solid; border-top-color: #000000; color: #000000; margin-top: 10px; font-size: 18px; padding-top: 1.4em; padding-bottom: 5px; font-family: Omnes-pro, Arial, Verdana, sans-serif; background: none 0 0 repeat scroll #ffffff;"&gt;&lt;SPAN class="mw-headline"&gt;4.1 Set User Permissions&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="margin-top: 0.4em; margin-bottom: 0.5em; color: #333333; font-family: Omnes-pro, Arial, Verdana, sans-serif;"&gt;Since the ODBC driver communicates with the instance using SOAP, the user account must have the soap_query role. The soap role also provides query access through SOAP, but allows additional actions that are not available through ODBC, such as insert or update.&lt;/P&gt;&lt;BR /&gt;&lt;P style="margin-top: 0.4em; margin-bottom: 0.5em; color: #333333; font-family: Omnes-pro, Arial, Verdana, sans-serif;"&gt;The user account must also be able to read records on the tables you want to query. For example, to query incident records, the ODBC user must have read permission for the Incident table. You can &lt;A href="http://wiki.servicenow.com/index.php?title=Creating_Roles" style="color: #031da7;" title="Creating Roles"&gt;create a new role&lt;/A&gt;, for example a role called ODBC, grant that role to the ODBC user, and configure &lt;A href="http://wiki.servicenow.com/index.php?title=Using_Access_Control_Rules#Creating_ACL_Rules" style="color: #031da7;" title="Using Access Control Rules"&gt;ACL rules&lt;/A&gt; to allow users with that role to query the Incident table.&lt;/P&gt;&lt;BR /&gt;&lt;P style="margin-top: 0.4em; margin-bottom: 0.5em; color: #333333; font-family: Omnes-pro, Arial, Verdana, sans-serif;"&gt;To create the ODBC role and grant the ODBC user the required roles:&lt;/P&gt;&lt;BR /&gt;&lt;OL style="list-style-image: none; margin-top: 0.3em; margin-left: 3.2em; color: #333333; font-family: Omnes-pro, Arial, Verdana, sans-serif;"&gt;&lt;LI&gt;Navigate to &lt;STRONG&gt;User Administration &amp;gt; Roles&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Click &lt;STRONG&gt;New&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;In the &lt;STRONG&gt;Name&lt;/STRONG&gt; field, enter &lt;STRONG&gt;ODBC&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Click &lt;STRONG&gt;Submit&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Navigate to &lt;STRONG&gt;User Administration &amp;gt; Users&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Select the ODBC user account you created.&lt;/LI&gt;&lt;LI&gt;In the &lt;STRONG&gt;Roles&lt;/STRONG&gt; related list, click &lt;STRONG&gt;Edit&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Use the &lt;A href="http://wiki.servicenow.com/index.php?title=Slushbucket" style="color: #031da7;" title="Slushbucket"&gt;slushbucket&lt;/A&gt; to add the ODBC and soap_query roles.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="margin-top: 0.4em; margin-bottom: 0.5em; color: #333333; font-family: Omnes-pro, Arial, Verdana, sans-serif;"&gt;To define ACL rules for the ODBC role:&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;OL style="list-style-image: none; margin-top: 0.3em; margin-left: 3.2em; color: #333333; font-family: Omnes-pro, Arial, Verdana, sans-serif;"&gt;&lt;LI&gt;&lt;A href="http://wiki.servicenow.com/index.php?title=High_Security_Settings#Elevated_Privilege" style="color: #031da7;" title="High Security Settings"&gt;Elevate the session permissions&lt;/A&gt; so you can create ACL rules.&lt;/LI&gt;&lt;LI&gt;Navigate to &lt;STRONG&gt;System Security &amp;gt; Access Controls (ACL)&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Click &lt;STRONG&gt;New&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;From the &lt;STRONG&gt;Operation&lt;/STRONG&gt; choice list, select &lt;STRONG&gt;read&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;From the &lt;STRONG&gt;Name&lt;/STRONG&gt; choice list, select &lt;STRONG&gt;Incident [incident]&lt;/STRONG&gt;.&lt;DL style="margin-bottom: 0.5em; margin-top: 0.2em;"&gt;&lt;DD style="margin-bottom: 0.1em; margin-left: 1.6em;"&gt;Leave the second &lt;STRONG&gt;Name&lt;/STRONG&gt; choice list as &lt;STRONG&gt;None&lt;/STRONG&gt;.&lt;/DD&gt;&lt;/DL&gt;&lt;/LI&gt;&lt;LI&gt;Right-click the form header and select &lt;STRONG&gt;Save&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;In the &lt;STRONG&gt;Requires role&lt;/STRONG&gt; related list, click &lt;STRONG&gt;Edit&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Use the &lt;A href="http://wiki.servicenow.com/index.php?title=Slushbucket" style="color: #031da7;" title="Slushbucket"&gt;slushbucket&lt;/A&gt; to add the ODBC role.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2015 08:34:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662697#M319623</guid>
      <dc:creator>tony_barratt</dc:creator>
      <dc:date>2015-11-25T08:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662698#M319624</link>
      <description>&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I did follow all the steps defined above.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Here is the query I am using:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;select * from OPENQUERY(SERVICENOW,'select [label],element,dependent_value,[hint],language,cast(sequence as int),sys_id,value from sys_choice order by [label] asc')&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I am getting correct data for only 'label' column. All other columns show up as NULL, though they have data in them.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2015 09:29:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662698#M319624</guid>
      <dc:creator>hemant10</dc:creator>
      <dc:date>2015-11-25T09:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662699#M319625</link>
      <description>&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I created a ACL on column 'element' and I was able to pull data for that column. Will try to create ACLs for other columns as well and see if it works. But not sure why I have to create at column level when I already have one at table level.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Hemant&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2015 09:35:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662699#M319625</guid>
      <dc:creator>hemant10</dc:creator>
      <dc:date>2015-11-25T09:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662700#M319626</link>
      <description>&lt;P&gt;Hi Hemant,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Good news!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;You can OK all the fields at the same time with a &lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;sys_choice.*&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;Tony&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2015 10:06:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662700#M319626</guid>
      <dc:creator>tony_barratt</dc:creator>
      <dc:date>2015-11-25T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662701#M319627</link>
      <description>&lt;P&gt;Thanks Tony. sys_choice.* works well.. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2015 10:21:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662701#M319627</guid>
      <dc:creator>hemant10</dc:creator>
      <dc:date>2015-11-25T10:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to query sys_choice table via ODBC</title>
      <link>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662702#M319628</link>
      <description>&lt;P&gt;Hi Hemant,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Excellent news!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;All good now? If not, can you update with further questions.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If yes consider marking the question as answered, and marking replies as helpful as appropriate.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Nov 2015 11:28:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/unable-to-query-sys-choice-table-via-odbc/m-p/1662702#M319628</guid>
      <dc:creator>tony_barratt</dc:creator>
      <dc:date>2015-11-25T11:28:36Z</dc:date>
    </item>
  </channel>
</rss>

