<?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 Proc Contents on a &amp;quot;Connect To SQL Server&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Contents-on-a-quot-Connect-To-SQL-Server-quot/m-p/888472#M351018</link>
    <description>&lt;P&gt;I run proc sql by connecting to sql server table (proc sql; connect to sqlsvr (dsn=table_name readbuff=15000))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I would like to run a proc contents on the table (dsn=table_name) but I must be getting the syntax wrong.&amp;nbsp; Is it even possible to run proc contents when connecting to SQL server?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated...&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 20:58:38 GMT</pubDate>
    <dc:creator>b77</dc:creator>
    <dc:date>2023-08-08T20:58:38Z</dc:date>
    <item>
      <title>Proc Contents on a "Connect To SQL Server"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Contents-on-a-quot-Connect-To-SQL-Server-quot/m-p/888472#M351018</link>
      <description>&lt;P&gt;I run proc sql by connecting to sql server table (proc sql; connect to sqlsvr (dsn=table_name readbuff=15000))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I would like to run a proc contents on the table (dsn=table_name) but I must be getting the syntax wrong.&amp;nbsp; Is it even possible to run proc contents when connecting to SQL server?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated...&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 20:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Contents-on-a-quot-Connect-To-SQL-Server-quot/m-p/888472#M351018</guid>
      <dc:creator>b77</dc:creator>
      <dc:date>2023-08-08T20:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Contents on a "Connect To SQL Server"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Contents-on-a-quot-Connect-To-SQL-Server-quot/m-p/888480#M351025</link>
      <description>&lt;P&gt;When you use PROC SQL to connect to SQL server, you're using "explicit pass-through" to let you write Microsoft SQL Server code and send it to SQL server to execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot use PROC CONTENTS in an explicit pass-through block because PROC CONTENTS is SAS code, not SQL Server Code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to run PROC CONTENTS on a SQL server table, you can use the LIBNAME statement to create a libref that points to the SQL server database.&amp;nbsp; Then you can run the usual PROC CONTENTS step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mysqldb ... ;
proc contents data=mysqldb.mytable;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you do that, you're using "implicit pass-through".&amp;nbsp; You're submitting SAS code and telling SAS to translate it into SQL server code.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 22:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Contents-on-a-quot-Connect-To-SQL-Server-quot/m-p/888480#M351025</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-08-08T22:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Contents on a "Connect To SQL Server"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Contents-on-a-quot-Connect-To-SQL-Server-quot/m-p/888498#M351033</link>
      <description>&lt;P&gt;On top of what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;says:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Contents then will you show how the SQL Server columns map into SAS columns. It will not show you the SQL Server column types (like: a varchar on the SQL Server side will map into a CHAR on the SAS side and that's what Proc Contents will show).&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 04:35:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Contents-on-a-quot-Connect-To-SQL-Server-quot/m-p/888498#M351033</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-08-09T04:35:18Z</dc:date>
    </item>
  </channel>
</rss>

