<?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: How do I pull N rows from a database at a  time ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-pull-N-rows-from-a-database-at-a-time/m-p/923350#M363527</link>
    <description>&lt;P&gt;Yours is the second recent post on this topic. Here is the other one that may be of some help:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-Stop-amp-Restart-Query-Every-30-min/m-p/922572#M363274" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-Stop-amp-Restart-Query-Every-30-min/m-p/922572#M363274&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The obvious question is why can't the time out limit be changed? This could be the result of a firewall rule for example. I suggest you check with your SAS administrator before spending a lot of time working around this limitation - better to cure the disease rather than deal with the symptom.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Apr 2024 21:02:13 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2024-04-07T21:02:13Z</dc:date>
    <item>
      <title>How do I pull N rows from a database at a  time ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-pull-N-rows-from-a-database-at-a-time/m-p/923346#M363525</link>
      <description>&lt;P&gt;I recently started using an AWS credential to access data in a cloud database. Currently we are dealing with a limitation where we get timed out after 1 hour. (Not really what I need help with, but just to give some context why I am approaching the issue this way).&amp;nbsp; This only allows me to pull about 1 million or so records at a time if I do a limit 1000000 statement at the end of the query. I don't have other fields that would make good filters to split the dataset up. Is there a way to pull the first million in one query, then make sure I am pulling the next million, so on and so forth. I can see how many records there are in each monthly table, so if I can do these pulls sequentially I should be able to pull all the records separately to address the credential issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2024 17:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-pull-N-rows-from-a-database-at-a-time/m-p/923346#M363525</guid>
      <dc:creator>KatWinSASland</dc:creator>
      <dc:date>2024-04-07T17:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull N rows from a database at a  time ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-pull-N-rows-from-a-database-at-a-time/m-p/923350#M363527</link>
      <description>&lt;P&gt;Yours is the second recent post on this topic. Here is the other one that may be of some help:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-Stop-amp-Restart-Query-Every-30-min/m-p/922572#M363274" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-Stop-amp-Restart-Query-Every-30-min/m-p/922572#M363274&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The obvious question is why can't the time out limit be changed? This could be the result of a firewall rule for example. I suggest you check with your SAS administrator before spending a lot of time working around this limitation - better to cure the disease rather than deal with the symptom.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2024 21:02:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-pull-N-rows-from-a-database-at-a-time/m-p/923350#M363527</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-04-07T21:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I pull N rows from a database at a  time ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-pull-N-rows-from-a-database-at-a-time/m-p/923371#M363534</link>
      <description>&lt;P&gt;Using FIRSTOBS= and OBS= dataset options:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro get_chunk(n);
data chunk&amp;amp;n.;
set source.table (firstobs=%eval(&amp;amp;n. * 1000000 + 1) obs=%eval((&amp;amp;n. + 1) * 1000000));
run;
%mend;

%get_chunk(0)
%get_chunk(1)
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You need to add code that sets the correct OBS= value for the last chunk.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 08:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-pull-N-rows-from-a-database-at-a-time/m-p/923371#M363534</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-04-08T08:01:51Z</dc:date>
    </item>
  </channel>
</rss>

