<?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 and delete rows in PROC SQL for not complying with the requirements in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503018#M756</link>
    <description>&lt;P&gt;Please do not post data in pictures, use data steps with datalines.&lt;/P&gt;
&lt;P&gt;A therefore untested solution:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
if countw(date_time) = 1 then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 10 Oct 2018 09:54:28 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-10-10T09:54:28Z</dc:date>
    <item>
      <title>Select and delete rows in PROC SQL for not complying with the requirements</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503004#M754</link>
      <description>&lt;P&gt;I have a table like the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23928i2043C2D6244BE420/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first two rows do not comply with the requirement as they do not show time. How can I select the 2 rows and delete afterward on SAS?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 08:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503004#M754</guid>
      <dc:creator>d6k5d3</dc:creator>
      <dc:date>2018-10-10T08:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select and delete rows in PROC SQL for not complying with the requirements</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503018#M756</link>
      <description>&lt;P&gt;Please do not post data in pictures, use data steps with datalines.&lt;/P&gt;
&lt;P&gt;A therefore untested solution:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
if countw(date_time) = 1 then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Oct 2018 09:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503018#M756</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-10T09:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select and delete rows in PROC SQL for not complying with the requirements</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503120#M777</link>
      <description>&lt;P&gt;What is the data type of the first column?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/239423"&gt;@d6k5d3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have a table like the following:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23928i2043C2D6244BE420/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first two rows do not comply with the requirement as they do not show time. How can I select the 2 rows and delete afterward on SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You could just check the length of it if it's a character and if the length is less than whatever it should be, then delete the record.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 15:05:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503120#M777</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-10T15:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Select and delete rows in PROC SQL for not complying with the requirements</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503145#M783</link>
      <description>&lt;P&gt;Hello Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I tried your code. But no rows got deleted.&lt;/P&gt;&lt;P&gt;I imported the Date_time as: informat Date_Time $21. ;&amp;nbsp;format Date_Time $21. ;&amp;nbsp;input Date_Time $;&lt;/P&gt;&lt;P&gt;Any other thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your time. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 16:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503145#M783</guid>
      <dc:creator>d6k5d3</dc:creator>
      <dc:date>2018-10-10T16:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select and delete rows in PROC SQL for not complying with the requirements</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503147#M784</link>
      <description>Hey Reeza, Thanks!&lt;BR /&gt;I imported them as character.</description>
      <pubDate>Wed, 10 Oct 2018 16:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503147#M784</guid>
      <dc:creator>d6k5d3</dc:creator>
      <dc:date>2018-10-10T16:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select and delete rows in PROC SQL for not complying with the requirements</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503151#M785</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/239423"&gt;@d6k5d3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hey Reeza, Thanks!&lt;BR /&gt;I imported them as character.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did you try the length method I suggested?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if length(dateTime) &amp;lt; 10 then delete;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 16:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503151#M785</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-10T16:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select and delete rows in PROC SQL for not complying with the requirements</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503287#M800</link>
      <description>Great! Worked just fine! Thank you very much! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 11 Oct 2018 00:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Select-and-delete-rows-in-PROC-SQL-for-not-complying-with-the/m-p/503287#M800</guid>
      <dc:creator>d6k5d3</dc:creator>
      <dc:date>2018-10-11T00:56:08Z</dc:date>
    </item>
  </channel>
</rss>

