<?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: INSERT INTO with Where Clause NOT IN in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INSERT-INTO-with-Where-Clause-NOT-IN/m-p/576539#M163201</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
	INSERT INTO SERVER.TABLEB (GRVID)
	SELECT VTGONR
	FROM SERVER.TABLEA
	WHERE VTGONR not in (SELECT GRVID FROM SERVER.TABLEB); 
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Mention the Key variable before NOT IN&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2019 11:41:28 GMT</pubDate>
    <dc:creator>Sathish_jammy</dc:creator>
    <dc:date>2019-07-25T11:41:28Z</dc:date>
    <item>
      <title>INSERT INTO with Where Clause NOT IN</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INSERT-INTO-with-Where-Clause-NOT-IN/m-p/576527#M163196</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to insert in TableB all items from TableA which are not appear in TableB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
	INSERT INTO SERVER.TABLEB (GRVID)
	SELECT VTGONR
	FROM SERVER.TABLEA
	WHERE not in (SELECT GRVID FROM SERVER.TABLEB); 
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But if I run this code, I get Always an error.&lt;/P&gt;&lt;P&gt;The field &lt;STRONG&gt;&lt;U&gt;GRVID&lt;/U&gt;&amp;nbsp;&lt;/STRONG&gt;is underlined and I get following error text:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, ), *, **, +, ',', -, '.', /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND,&lt;BR /&gt;BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||,&lt;BR /&gt;~, ~=.&lt;/P&gt;&lt;P&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If I run the code without the WHERE clause it works, but if I add the WHERE clause I get the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sascha&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 10:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INSERT-INTO-with-Where-Clause-NOT-IN/m-p/576527#M163196</guid>
      <dc:creator>SaschaD</dc:creator>
      <dc:date>2019-07-25T10:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: INSERT INTO with Where Clause NOT IN</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INSERT-INTO-with-Where-Clause-NOT-IN/m-p/576539#M163201</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
	INSERT INTO SERVER.TABLEB (GRVID)
	SELECT VTGONR
	FROM SERVER.TABLEA
	WHERE VTGONR not in (SELECT GRVID FROM SERVER.TABLEB); 
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Mention the Key variable before NOT IN&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 11:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INSERT-INTO-with-Where-Clause-NOT-IN/m-p/576539#M163201</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2019-07-25T11:41:28Z</dc:date>
    </item>
  </channel>
</rss>

