<?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 with IN command in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145018#M28934</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check your syntex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from LIB_REF1.ODS_CUSTOMER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS_CUSTOMER.ID1 IN (select CUST.ID1 from LIB_REF2.CUST) and &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS_CUSTOMER.ID2 IN (select CUST.ID2 from LIB_REF2.CUST);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2014 20:56:53 GMT</pubDate>
    <dc:creator>pradeepalankar</dc:creator>
    <dc:date>2014-01-17T20:56:53Z</dc:date>
    <item>
      <title>Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145017#M28933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;An error is occurring when running the command below in SAS DI.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;The SAS does not accept the IN command with more than one parameter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; proc sql;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from LIB_REF1.ODS_CUSTOMER&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ODS_CUSTOMER.ID1, ODS_CUSTOMER.ID2) IN (&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select CUST.ID1,CUST.ID2 from LIB_REF2.CUST&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 16:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145017#M28933</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2014-01-17T16:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145018#M28934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check your syntex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from LIB_REF1.ODS_CUSTOMER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS_CUSTOMER.ID1 IN (select CUST.ID1 from LIB_REF2.CUST) and &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ODS_CUSTOMER.ID2 IN (select CUST.ID2 from LIB_REF2.CUST);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 20:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145018#M28934</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-01-17T20:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145019#M28935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The proc sql that you sent does not generate the same result as the proc sql I want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 21:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145019#M28935</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2014-01-17T21:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145020#M28936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;delete from lib_ref1.ods_customer t1&lt;/P&gt;&lt;P&gt;where exists (select * from lib_ref2.cust where id1=t1.id1 and id2=t2.id2);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 21:46:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145020#M28936</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2014-01-17T21:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145021#M28937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you example input and output data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 21:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145021#M28937</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-01-17T21:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145022#M28938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DBailey, Thanks for the reply. &lt;/P&gt;&lt;P&gt;I had done this Proc SQL that you sent me. &lt;/P&gt;&lt;P&gt;How this Proc SQL with Exists is running very slow, I wanted to test with the IN command. &lt;/P&gt;&lt;P&gt;You know if I can use the IN command with more than one parameter, as my example?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; proc sql;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete from LIB_REF1.ODS_CUSTOMER&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ODS_CUSTOMER.ID1, ODS_CUSTOMER.ID2) IN (&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select CUST.ID1,CUST.ID2 from LIB_REF2.CUST&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 12:16:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145022#M28938</guid>
      <dc:creator>DavidCaliman</dc:creator>
      <dc:date>2014-01-20T12:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145023#M28939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No you can't, it's not valid ANSI SQL syntax.&lt;/P&gt;&lt;P&gt;It's not clear to me exactly what this SQL will leave as result. If you&amp;nbsp; can't describe in words, please supply attach sample input and output data that shows the desired logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 12:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145023#M28939</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-01-20T12:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete with IN command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145024#M28940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have code that would run nicely in a dbms like Teradata, but is unfortunately not valid in SAS.&lt;/P&gt;&lt;P&gt;You could adapt it (with probable performance penalty) by concatenating the columns, like&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG&gt; where&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; ODS_CUSTOMER.ID1 !! ODS_CUSTOMER.ID2 IN ( select CUST.ID1 !! CUST.ID2 from LIB_REF2.CUST&amp;nbsp; )&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;with implicit or explicit datatype conversion if these customer IDs are numeric.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;As you use syntax typical of a dbms, your syntax will work within "explicit pass-through" to your dbms see &lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a000245480.htm"&gt;http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a000245480.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 08:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-with-IN-command/m-p/145024#M28940</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-01-22T08:34:13Z</dc:date>
    </item>
  </channel>
</rss>

