<?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 delete all the records with perticular id in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70797#M7081</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
    If One coloum is missing,then i want to delete all the records under that id.&lt;BR /&gt;
&lt;BR /&gt;
    How can i do this using query analyser in EG.Thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
brm</description>
    <pubDate>Fri, 27 May 2011 22:25:13 GMT</pubDate>
    <dc:creator>brm</dc:creator>
    <dc:date>2011-05-27T22:25:13Z</dc:date>
    <item>
      <title>delete all the records with perticular id</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70797#M7081</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
    If One coloum is missing,then i want to delete all the records under that id.&lt;BR /&gt;
&lt;BR /&gt;
    How can i do this using query analyser in EG.Thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
brm</description>
      <pubDate>Fri, 27 May 2011 22:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70797#M7081</guid>
      <dc:creator>brm</dc:creator>
      <dc:date>2011-05-27T22:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: delete all the records with perticular id</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70798#M7082</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
Assuming you're talking about the Query Builder and that "deleting" means you don't want such observations in the output then one way to go could be (EG 4.2):&lt;BR /&gt;
&lt;BR /&gt;
1. Tab "Select Data":&lt;BR /&gt;
Define a computed column. Step 1: "advanced expression", step 2: select your variable with missings, step 3: under Summary choose "NMISS"&lt;BR /&gt;
&lt;BR /&gt;
2. Tab "Select Data":&lt;BR /&gt;
Have your ID variable under "Summary groups".&lt;BR /&gt;
&lt;BR /&gt;
3. Tab "Filter": Add the calculated variable to  "Filter the summarized data". In a "basic filter" set the condition to "Equals to" with value "0"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This should result in SQL code which looks like:&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
   CREATE TABLE SASUSER.QUERY_FOR_HAVE AS &lt;BR /&gt;
   SELECT t1.id, &lt;BR /&gt;
          t1.var, &lt;BR /&gt;
          /* nmiss_var */&lt;BR /&gt;
            (NMISS(t1.var)) AS nmiss_var&lt;BR /&gt;
      FROM WORK.HAVE AS t1&lt;BR /&gt;
      GROUP BY t1.id&lt;BR /&gt;
      HAVING (CALCULATED nmiss_var) = 0;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Sat, 28 May 2011 05:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70798#M7082</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-05-28T05:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: delete all the records with perticular id</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70799#M7083</link>
      <description>Patrick,&lt;BR /&gt;
&lt;BR /&gt;
I did as you suggested...Here is the code generated&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
   CREATE TABLE SASUSER.QUERY_FOR_BOOK13 AS &lt;BR /&gt;
   SELECT /* results */&lt;BR /&gt;
            (NMISS(t1.'Next Milestone Type'n)) AS results, &lt;BR /&gt;
          t1.DRC_CASE_ID, &lt;BR /&gt;
          t1.'Next Milestone Type'n&lt;BR /&gt;
      FROM SASUSER.BOOK13 AS t1&lt;BR /&gt;
      GROUP BY t1.DRC_CASE_ID&lt;BR /&gt;
      HAVING (CALCULATED results) = 0;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
Getting below error in logs&lt;BR /&gt;
&lt;BR /&gt;
ODS PDF(EGPDF) printed no output. &lt;BR /&gt;
      (This sometimes results from failing to place a RUN statement before the ODS PDF(EGPDF) CLOSE &lt;BR /&gt;
      statement.)&lt;BR /&gt;
&lt;BR /&gt;
Please Tell me where i'm doing wrong.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
reddy

Message was edited by: reddy19</description>
      <pubDate>Tue, 31 May 2011 04:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70799#M7083</guid>
      <dc:creator>reddy19</dc:creator>
      <dc:date>2011-05-31T04:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: delete all the records with perticular id</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70800#M7084</link>
      <description>Hi reddy&lt;BR /&gt;
&lt;BR /&gt;
The generated code as such looks o.k. to me.&lt;BR /&gt;
&lt;BR /&gt;
If you don't get an output then one reason could be that variable 'Next Milestone Type'n has missing values for every single distinct value of by group variable "DRC_CASE_ID".&lt;BR /&gt;
&lt;BR /&gt;
I'm hardly using PDF output so can't say anything about this one.&lt;BR /&gt;
&lt;BR /&gt;
First thing I would try is running the script with another output destination to see if it's an ODS PDF issue or something else.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Wed, 01 Jun 2011 09:12:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70800#M7084</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-06-01T09:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: delete all the records with perticular id</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70801#M7085</link>
      <description>Hi Patrick,&lt;BR /&gt;
&lt;BR /&gt;
           Below query is giving only the number of missing values&lt;BR /&gt;
&lt;BR /&gt;
           SELECT /* results */&lt;BR /&gt;
(NMISS(t1.'Next Milestone Type'n)) AS results&lt;BR /&gt;
&lt;BR /&gt;
So there is no way to exclude rows by id....because of that it is throwing error.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Bhavani.</description>
      <pubDate>Wed, 01 Jun 2011 17:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70801#M7085</guid>
      <dc:creator>brm</dc:creator>
      <dc:date>2011-06-01T17:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: delete all the records with perticular id</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70802#M7086</link>
      <description>Hi brm&lt;BR /&gt;
&lt;BR /&gt;
Of course you can exclude rows by ID. The code I've posted was tested and returned the expected result.&lt;BR /&gt;
&lt;BR /&gt;
The important part is the "group by" ID and "having clause" selecting only ID's where NMISS returned 0 (=no missings).&lt;BR /&gt;
&lt;BR /&gt;
What reddy19 doesn't get is an output - but that can be caused by having missings for every by group. We have to wait for reddy19's next posting to know more.</description>
      <pubDate>Wed, 01 Jun 2011 22:29:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/delete-all-the-records-with-perticular-id/m-p/70802#M7086</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-06-01T22:29:54Z</dc:date>
    </item>
  </channel>
</rss>

