<?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: SAS Connection to SQL error via ODBC in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333454#M272123</link>
    <description>&lt;P&gt;This is most likely a configuration issue. It is best to call SAS Tech Support.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2017 16:30:50 GMT</pubDate>
    <dc:creator>JBailey</dc:creator>
    <dc:date>2017-02-16T16:30:50Z</dc:date>
    <item>
      <title>SAS to SQL Error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333086#M272102</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I am using SAS server in linux and tried the connection to MS SQL server via ODBC, I got errors. The connection could not be established successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;1) When using Libname, no real error message in the log file, but the table I see from SAS library is not the real table in SQL studio (the Table in SAS library seems to have a chopped off name of the real table in SQL studio)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; SAS statement:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;LIBNAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sqltest &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;odbc&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Password&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=** &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;User&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=** &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DATASRC&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=** &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;schema&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=**;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B:&lt;/STRONG&gt; Table in SAS library, see attached word file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:&lt;/STRONG&gt; Table in SQL studio, see attached word file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt; 2) When using pass through, got error message.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A: SAS statement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; odbc (noprompt = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"dsn=**;DRIVER=SQLServer;uid=**;pwd=**;"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Prod02test &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to odbc&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; *&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; [**]&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;[**]&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;[**]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;disconnect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; odbc;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B: Error message&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR: CLI describe error: [&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the possible reason for that? Is there something wrong from SAS side or SQL side? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jade&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 17:10:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333086#M272102</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-15T17:10:40Z</dc:date>
    </item>
    <item>
      <title>SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333085#M272104</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I am using SAS server in linux and tried the connection to MS SQL server via ODBC, I got errors. The connection could not be established successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;1) When using Libname, no real error message in the log file, but the table I see from SAS library is not the real table in SQL studio (the Table in SAS library seems to have a chopped off name of the real table in SQL studio)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; SAS statement:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;LIBNAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sqltest &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;odbc&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Password&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=** &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;User&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=** &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DATASRC&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=** &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;schema&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=**;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B:&lt;/STRONG&gt; Table in SAS library, see attached word file.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:&lt;/STRONG&gt; Table in SQL studio, see attached word file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt; 2) When using pass through, got error message.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A: SAS statement:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; odbc (noprompt = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"dsn=**;DRIVER=SQLServer;uid=**;pwd=**;"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Prod02test &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to odbc&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; *&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; [**]&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;[**]&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;[**]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;disconnect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; odbc;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B: Error message&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR: CLI describe error: [&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the possible reason for that? Is there something wrong from SAS side or SQL side? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jade&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 17:09:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333085#M272104</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-15T17:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333101#M272105</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to odbc&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;(anything in these parenthesis is being passed directly to the ODBC driver for translation. SAS has nothing to do with it. It is called explicit pass-through&lt;/FONT&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;BR /&gt;Jeff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 18:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333101#M272105</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-15T18:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333112#M272106</link>
      <description>&lt;P&gt;So you mean it is an error from SQL side? Not SAS server parameter sut up problem?&lt;/P&gt;&lt;P&gt;It seems all the tables extract via ODBC only has initail letter left.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 18:47:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333112#M272106</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-15T18:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to SQL Error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333163#M272103</link>
      <description>&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;Hallo Jade,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;The error message seems to be missing some info. What comes behind the &lt;FONT color="#0000ff"&gt;error:[&lt;/FONT&gt; ?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;Are you using Access to ODBC, and if yes, what bitness? &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;What is the bitness of your OS?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;Thanks&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;Anja&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="lucida sans unicode,lucida sans"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 21:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333163#M272103</guid>
      <dc:creator>anja</dc:creator>
      <dc:date>2017-02-15T21:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333173#M272107</link>
      <description>&lt;P&gt;Yes, the problem is being reported by SQL Server.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide a more readable version of your SQL code? There are too many "**" in there. It is hard to understand. What is your goal here? List of tables?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 21:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333173#M272107</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-15T21:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to SQL Error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333298#M272108</link>
      <description>&lt;P&gt;I merged the identical questions into one thread in General SAS Programming.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post ERROR messages and such as text, using the {i} button. MS Office documents can contain malware and are therefore blocked in many places. For screenshots, use the png format, but text is always preferred.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 06:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333298#M272108</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-16T06:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to SQL Error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333372#M272109</link>
      <description>&lt;P&gt;@&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/25908" target="_self"&gt;&lt;SPAN class="login-bold"&gt;anja&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;Sorry I missed this reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's all the Error said.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, I am using access ODBC to connect to Microsoft sql tables, I think it is 32 bit.&lt;/P&gt;&lt;P&gt;Talking OS, I may need to ask the SAS admin, as we using SAS server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 13:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333372#M272109</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T13:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333374#M272110</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/51161"&gt;@JBailey&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;LIBNAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sqltest &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;odbc&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Password&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=yourpassword&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;User&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=yourID &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DATASRC&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=yourdatasource &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;schema&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=yourschema;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;2) When using pass through&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;connect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;to&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; odbc (noprompt = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"dsn=yourdatasource;DRIVER=SQLServer;uid=yourID;pwd=yourPWD;"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Prod02test &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; connection to odbc&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; *&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; [database]&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;[schema]&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;[table]&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;disconnect&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; odbc;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 13:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333374#M272110</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T13:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333386#M272111</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code uses SAS/ACCESS Interface to ODBC to connect to Microsoft SQL Server. It may help you (then again, it may not):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mssqlodb odbc dsn=mssql user=sasxjb password=mypassword;

/* Determine my default database so that I can use it in the query */
proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select name, default_database_name from sys.server_principals);
quit;

/* Can be written like */
proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select name, default_database_name from [sys].[server_principals]);
quit;

/* List all databases */
proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select name from [master].[dbo].[sysdatabases]);
quit;

/* Or... like this */
proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select name from master.dbo.sysdatabases);
quit;

/* Create a test table */
data mssqlodb.mytable;
   x=1; output;
run;

/* Read data from mytable. My default database is test */
proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select * from test.sasxjb.mytable);
quit;

/* Or... like this */
proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select * from [test].[sasxjb].[mytable]);
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I enter an invalid value I get something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;146  /* there is no database named bogus */
147  proc sql;
148     connect using mssqlodb;
149     select * from connection to mssqlodb
150        (select * from [bogus].[sasxjb].[mytable]);
ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
       'bogus.sasxjb.mytable'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s)
       could not be prepared.
151  quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.02 seconds
      cpu time            0.00 seconds

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jeff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 14:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333386#M272111</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-16T14:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333394#M272112</link>
      <description>&lt;P&gt;Thank you, all these are using MSsql. We do not have that license.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We only can connect to MSSQL via ODBC at this moment. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 14:39:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333394#M272112</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T14:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333397#M272113</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The examples I provided use&amp;nbsp;SAS/ACCESS Interface to ODBC to connect to a Microsoft SQL Server database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the LIBNAME statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mssql &lt;STRONG&gt;ODBC&lt;/STRONG&gt; dsn=mssql user=sasxjb password=mypassword;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I will edit the code to make it more clear.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 14:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333397#M272113</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-16T14:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333401#M272114</link>
      <description>&lt;P&gt;Thank you, my libname coding is the same as yours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no problem with my libname and pass through coding, I do not know why the table name showed in SAS get chopped off, only initial letter of the table name left.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 14:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333401#M272114</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T14:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333404#M272115</link>
      <description>&lt;P&gt;Are all your queries failing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you get something simple, like this, to work? Have you gotten any query to work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mssqlodb odbc dsn=mssql user=myuser password=mypassword;

/* Create a test table */
data mssqlodb.mytable;
   x=1; output;
run;

proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select * from myuser.mytable);
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you can't get any query to work, it may be time to call Tech Support. If other queries work, there may be a hidden control character in the query text.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 15:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333404#M272115</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-16T15:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333408#M272116</link>
      <description>&lt;P&gt;Thank you, I do not have writing right to the SQL server &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 15:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333408#M272116</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T15:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS to SQL Error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333410#M272117</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please let me know the link of the thread you talked about? Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 15:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333410#M272117</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T15:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333417#M272118</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OK, no problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to read any table from Microsoft SQL Server using SAS? Can any of your co-workers read a Microsoft SQL Server table using SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does a query similar to this work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mssqlodb odbc dsn=mssql user=myuser password=mypasswd;

proc sql;
   connect using mssqlodb;
   select * from connection to mssqlodb
      (select * from sysobjects where xtype='U');
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;er&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 15:39:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333417#M272118</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-16T15:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333425#M272119</link>
      <description>&lt;P&gt;No, get the same error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR: CLI describe error: [&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 15:31:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333425#M272119</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333432#M272120</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are your co-workers able to successfully submit Microsoft SQL Server queries using SAS/ACCESS Interface to ODBC?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 15:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333432#M272120</guid>
      <dc:creator>JBailey</dc:creator>
      <dc:date>2017-02-16T15:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Connection to SQL error via ODBC</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333450#M272121</link>
      <description>&lt;P&gt;No, they can not&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 16:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-to-SQL-Error-via-ODBC/m-p/333450#M272121</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-02-16T16:28:21Z</dc:date>
    </item>
  </channel>
</rss>

