<?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: delete statement in Proc SQL in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/delete-statement-in-Proc-SQL/m-p/450573#M69717</link>
    <description>&lt;P&gt;Syntax seems to be fine. What error do you get?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2018 11:12:06 GMT</pubDate>
    <dc:creator>rudfaden</dc:creator>
    <dc:date>2018-04-03T11:12:06Z</dc:date>
    <item>
      <title>delete statement in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-statement-in-Proc-SQL/m-p/450523#M69715</link>
      <description>&lt;P&gt;Hi how do I convert SQL delete statements into Proc SQL delete statements?&amp;nbsp; I would like to convert the following sql to proc sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;delete #campaigntrk_comb&lt;BR /&gt;from #campaigntrk_comb a, campaigndb.dbo.CampaignTrck_Ended b&lt;BR /&gt;where a.NBID = b.nbid&lt;BR /&gt;and A.trandate = b.Trandate&lt;BR /&gt;and a.campcode &amp;lt;&amp;gt; b.targetcampaign&lt;BR /&gt;go&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the following which does not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;delete from campaigntrk_comb as a&lt;BR /&gt;where EXISTS&lt;BR /&gt;&amp;nbsp; &amp;nbsp; (select a.nbid, a.trandate, a.campcode&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from camp.CampaignTrck_Ended as b&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where a.NBID = b.nbid&lt;BR /&gt;&amp;nbsp; &amp;nbsp; and a.trandate = b.Trandate&lt;BR /&gt;&amp;nbsp; &amp;nbsp; and a.campcode NE b.targetcampaign);&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I did at left outer join to exclude data and the result is different. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 06:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-statement-in-Proc-SQL/m-p/450523#M69715</guid>
      <dc:creator>galenhew</dc:creator>
      <dc:date>2018-04-03T06:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-statement-in-Proc-SQL/m-p/450573#M69717</link>
      <description>&lt;P&gt;Syntax seems to be fine. What error do you get?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 11:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-statement-in-Proc-SQL/m-p/450573#M69717</guid>
      <dc:creator>rudfaden</dc:creator>
      <dc:date>2018-04-03T11:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/delete-statement-in-Proc-SQL/m-p/450741#M69725</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 16:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/delete-statement-in-Proc-SQL/m-p/450741#M69725</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-03T16:25:29Z</dc:date>
    </item>
  </channel>
</rss>

