<?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: PROCS SQL delete rows with missing values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624638#M184043</link>
    <description>&lt;P&gt;In SAS/SQL you can use the CMISS function to count missing values ( WHERE CMISS( A, B, C, X, ... ) = 0, for example), but there is no shortcut syntax to specify variable lists. You will have to list all your variables explicitly as arguments of the CMISS function.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Feb 2020 20:31:08 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2020-02-13T20:31:08Z</dc:date>
    <item>
      <title>PROCS SQL delete rows with missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624573#M184012</link>
      <description>&lt;P&gt;I'm trying to combine these tables with PROC SQL and then delete any rows with missing data but I can't figure it out. Heres what I have.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-02-13 133059.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36106i937F14863D1C9128/image-size/large?v=v2&amp;amp;px=999" role="button" title="Annotation 2020-02-13 133059.png" alt="Annotation 2020-02-13 133059.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 18:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624573#M184012</guid>
      <dc:creator>matoma</dc:creator>
      <dc:date>2020-02-13T18:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROCS SQL delete rows with missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624579#M184017</link>
      <description>What defines 'missing data'?&lt;BR /&gt;Please post your code as text, not as an image. If I need to modify or add on to your code this means you're asking us to type it all out from scratch when it's infinitely easier and faster to copy/paste and edit your code. &lt;BR /&gt;&lt;BR /&gt;In general, you can use MISSING() to check if a value is missing. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Feb 2020 18:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624579#M184017</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-13T18:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROCS SQL delete rows with missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624584#M184021</link>
      <description>&lt;P&gt;SQL is very different when it comes to merging compared to SAS. You have to actually use the JOIN Statement for each individual table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below should be a working version of what your trying to do. Note your missing a semi-colon at the end of your where statement which in this case wouldn't fix errors but would still prevent this from running even if your code was correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For future reference: if you can use the {i} in your posts and plug your code in there it allows us to copy it instead of having to re-type it out. Another thing...when your running this in SAS you should be getting errors in your LOG. Copying these errors and providing is also very helpful, as well as for yourself because you can usually search the error and find a solution yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table hw2.merge as
select *
  from hw2.anthropometrics a
  join hw2.demographics as b on a.patient_id = b.patient_id
  join hw2.bloodpressure as c on a.patient_id = c.patient_id
  join hw2.allids as d on a.patient_id = c.patient_id
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compared to a merge in a data step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  merge hw2.anthropometrics hw2.demographis hw2.bloodpressure hw2.allids;
  by patient_id;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 18:55:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624584#M184021</guid>
      <dc:creator>Krueger</dc:creator>
      <dc:date>2020-02-13T18:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROCS SQL delete rows with missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624586#M184022</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm trying to&amp;nbsp;merge these tables&amp;nbsp;together and then delete any row with missing data from any variable. Heres what I have. I&amp;nbsp;can't find any way to refer to all variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;create table hw2.merge as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;select *&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;from hw2.anthropometrics as a, hw2.demographics as b, hw2.bloodpressure as c, hw2.allids as d&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;where a.patient_id=b.patient_id=c.patient_id=d.patient_id;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 18:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624586#M184022</guid>
      <dc:creator>matoma</dc:creator>
      <dc:date>2020-02-13T18:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROCS SQL delete rows with missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624638#M184043</link>
      <description>&lt;P&gt;In SAS/SQL you can use the CMISS function to count missing values ( WHERE CMISS( A, B, C, X, ... ) = 0, for example), but there is no shortcut syntax to specify variable lists. You will have to list all your variables explicitly as arguments of the CMISS function.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 20:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624638#M184043</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-02-13T20:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROCS SQL delete rows with missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624642#M184045</link>
      <description>You can use _all_ within a data step but not a SQL query. SQL doesn't support variable shortcuts or lists.</description>
      <pubDate>Thu, 13 Feb 2020 20:42:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROCS-SQL-delete-rows-with-missing-values/m-p/624642#M184045</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-13T20:42:18Z</dc:date>
    </item>
  </channel>
</rss>

