<?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 Copying SQL table to SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Copying-SQL-table-to-SAS/m-p/727021#M226037</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;i would really appreciate your help in solving an issue connecting to SQL database. Basically I am trying to copy the table 'Lab' which is stored in a SQL server 'Hospital' under database 'Results'.&lt;/P&gt;
&lt;P&gt;The SQL server is hosted on a network connected machine. I have trusted connection to the SQL server, s basically if I login into windows with my credentials and start Microsoft SQL management studio then i can directly connect to the SQL server 'Hospital' and view the database 'Results' with its tables including Lab.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to copy the table 'Lab' into SAS for processing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried usin the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname SQL_Lib ODBC NoPrompt="Driver=SQL Server;Server=Hospital; Database=Results;  schema = dbo; Trusted_Connection=Yes"; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This does not generate an error, however when i double click on the new library in SAS explorer window, there are no contents inside the library and I do not know if there is anything wrong with my code or if i should be using a code (which?) to copy the table without worrying about the absence of contents in the library.&lt;/P&gt;
&lt;P&gt;Any help is much appreciated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Mar 2021 08:34:55 GMT</pubDate>
    <dc:creator>ammarhm</dc:creator>
    <dc:date>2021-03-17T08:34:55Z</dc:date>
    <item>
      <title>Copying SQL table to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-SQL-table-to-SAS/m-p/727021#M226037</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;i would really appreciate your help in solving an issue connecting to SQL database. Basically I am trying to copy the table 'Lab' which is stored in a SQL server 'Hospital' under database 'Results'.&lt;/P&gt;
&lt;P&gt;The SQL server is hosted on a network connected machine. I have trusted connection to the SQL server, s basically if I login into windows with my credentials and start Microsoft SQL management studio then i can directly connect to the SQL server 'Hospital' and view the database 'Results' with its tables including Lab.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to copy the table 'Lab' into SAS for processing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried usin the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname SQL_Lib ODBC NoPrompt="Driver=SQL Server;Server=Hospital; Database=Results;  schema = dbo; Trusted_Connection=Yes"; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This does not generate an error, however when i double click on the new library in SAS explorer window, there are no contents inside the library and I do not know if there is anything wrong with my code or if i should be using a code (which?) to copy the table without worrying about the absence of contents in the library.&lt;/P&gt;
&lt;P&gt;Any help is much appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 08:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-SQL-table-to-SAS/m-p/727021#M226037</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2021-03-17T08:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Copying SQL table to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-SQL-table-to-SAS/m-p/727049#M226050</link>
      <description>&lt;P&gt;Try that.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc copy in=SQL_LIB out=WORK; select LAB; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 10:31:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-SQL-table-to-SAS/m-p/727049#M226050</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-17T10:31:17Z</dc:date>
    </item>
  </channel>
</rss>

