<?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 sql error - table has zero rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-error-table-has-zero-rows/m-p/675990#M203750</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large SAS EG project that creates, reads and joins 12 tables from a variety of sources.&amp;nbsp; Occasionally one of the tables that is joined in the final SQL stage has zero rows, but normally all tables have at least one row.&amp;nbsp; When SAS SQL sees the table with zero rows it throws an error stating that tables must have more than zero rows - but I am unable to control for that with the basic input tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking to insert a dummy row into the problematic table if there are zero rows, to allow for the project to run through to completion.&amp;nbsp; This would enable the join to occur without actually generating any additional rows of data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two questions that I would appreciate assistance with:&lt;/P&gt;&lt;P&gt;1. is there a better way to prevent this error?&lt;/P&gt;&lt;P&gt;2. how should i place a dummy row into a table (whether or not it has existing data)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 20:13:00 GMT</pubDate>
    <dc:creator>gordononline</dc:creator>
    <dc:date>2020-08-11T20:13:00Z</dc:date>
    <item>
      <title>proc sql error - table has zero rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-error-table-has-zero-rows/m-p/675990#M203750</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large SAS EG project that creates, reads and joins 12 tables from a variety of sources.&amp;nbsp; Occasionally one of the tables that is joined in the final SQL stage has zero rows, but normally all tables have at least one row.&amp;nbsp; When SAS SQL sees the table with zero rows it throws an error stating that tables must have more than zero rows - but I am unable to control for that with the basic input tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking to insert a dummy row into the problematic table if there are zero rows, to allow for the project to run through to completion.&amp;nbsp; This would enable the join to occur without actually generating any additional rows of data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two questions that I would appreciate assistance with:&lt;/P&gt;&lt;P&gt;1. is there a better way to prevent this error?&lt;/P&gt;&lt;P&gt;2. how should i place a dummy row into a table (whether or not it has existing data)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 20:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-error-table-has-zero-rows/m-p/675990#M203750</guid>
      <dc:creator>gordononline</dc:creator>
      <dc:date>2020-08-11T20:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc sql error - table has zero rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-error-table-has-zero-rows/m-p/675994#M203752</link>
      <description>&lt;P&gt;Can you post the log of the offending step including source code, notes, warnings and errors please. As a general rule SAS should cope with zero rows without errors.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 20:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-error-table-has-zero-rows/m-p/675994#M203752</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-11T20:32:01Z</dc:date>
    </item>
  </channel>
</rss>

