<?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: Select records proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Select-records-proc-sql/m-p/599527#M173069</link>
    <description>&lt;P&gt;The only TABLE1 in that query is in a remote database.&lt;/P&gt;
&lt;P&gt;So you need to know what syntax that database allows for limiting the number of observations returned by a query.&lt;/P&gt;</description>
    <pubDate>Sat, 26 Oct 2019 13:21:47 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-10-26T13:21:47Z</dc:date>
    <item>
      <title>Select records proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-records-proc-sql/m-p/599482#M173052</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Hi ,&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;STRONG&gt;Just wanted to check&amp;nbsp;what extra step I need to add&amp;nbsp;&amp;nbsp;to select 10 records from table1&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;SQL&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CONNECT TO&amp;nbsp;odbc &amp;nbsp;as&amp;nbsp;test&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (PATH=ksts&amp;nbsp;&amp;nbsp;userid=ksdetail password=&amp;amp;hh);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CREATE TABLE&amp;nbsp;MyTable AS&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT *&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM CONNECTION TO test&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;t1.ID&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM Table1 t1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISCONNECT FROM &lt;SPAN&gt;test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 00:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-records-proc-sql/m-p/599482#M173052</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2019-10-26T00:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select records proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-records-proc-sql/m-p/599488#M173053</link>
      <description>&lt;P&gt;Using your program this is the easiest way, not necessarily the most efficient:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;

   CONNECT TO odbc  as test

    (PATH=ksts  userid=ksdetail password=&amp;amp;hh);

            CREATE TABLE MyTable (obs= 10) AS

            SELECT *

            FROM CONNECTION TO test (

                 SELECT

                       t1.ID

                      FROM Table1 t1

                   );

             DISCONNECT FROM test;

QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 26 Oct 2019 01:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-records-proc-sql/m-p/599488#M173053</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-26T01:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select records proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-records-proc-sql/m-p/599527#M173069</link>
      <description>&lt;P&gt;The only TABLE1 in that query is in a remote database.&lt;/P&gt;
&lt;P&gt;So you need to know what syntax that database allows for limiting the number of observations returned by a query.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 13:21:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-records-proc-sql/m-p/599527#M173069</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-26T13:21:47Z</dc:date>
    </item>
  </channel>
</rss>

