<?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: table update with condition in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/table-update-with-condition/m-p/170527#M44067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found my answer.&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; update dicofr as h1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set period=(select period from correspondance as h2 where h1.name_fic=h2.name_fic)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where name_fic in (select name_fic from correspondance);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2014 12:04:16 GMT</pubDate>
    <dc:creator>andy_wk</dc:creator>
    <dc:date>2014-07-08T12:04:16Z</dc:date>
    <item>
      <title>table update with condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/table-update-with-condition/m-p/170526#M44066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;It should be an easy one but I'm stuck&lt;/P&gt;&lt;PRE class="lang-sql prettyprint prettyprinted" style="margin: 0 0 10px; padding: 5px; font-size: 14px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; background: #eeeeee;"&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;Proc&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; sql&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;UPDATE&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; dicofr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;SET&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;dicofr&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;period &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; correspondance&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;period &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; dicofr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;INNER&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; correspondance &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;ON&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; dicofr&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;name_fic &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; correspondance&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;name_fic&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;I was thinking my update would be done but I got this error instead.&lt;/P&gt;&lt;PRE class="lang-sql prettyprint prettyprinted" style="margin: 0 0 10px; padding: 5px; font-size: 14px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; background: #eeeeee;"&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;271&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; sql&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;272&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;update&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; dicofr &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;273&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;set&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; dicofr&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;period &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; correspondance&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;period &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;73&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;76&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; ERROR &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;73-322&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; Expecting an &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;&amp;nbsp; ERROR &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000; background: transparent;"&gt;76-322&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; Syntax error&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; statement will be ignored&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;I've tried with a straight join with a &lt;CODE style="padding: 1px 5px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background: #eeeeee;"&gt;select&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lang-sql prettyprint prettyprinted" style="margin: 0 0 10px; padding: 5px; font-size: 14px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; background: #eeeeee;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial;"&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; sql&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; dicofr &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;INNER&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; correspondance &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b; background: transparent;"&gt;ON&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt; dicofr&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;nom_fic&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;correspondance&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="background: transparent;"&gt;nom_fic&lt;/SPAN&gt;&lt;SPAN class="pun" style="background: transparent;"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;The select is fine.&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;How come?&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;Is my SQL query not correct? I don't think so ...&lt;/P&gt;&lt;P style="margin: 0 0 1em; font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14px; color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; background: #ffffff;"&gt;Edited&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; background-color: #ffffff;"&gt;: It seems the update I want to do is not possible. Is there a way to do what I want with SAS language?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 10:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/table-update-with-condition/m-p/170526#M44066</guid>
      <dc:creator>andy_wk</dc:creator>
      <dc:date>2014-07-08T10:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: table update with condition</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/table-update-with-condition/m-p/170527#M44067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found my answer.&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; update dicofr as h1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set period=(select period from correspondance as h2 where h1.name_fic=h2.name_fic)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where name_fic in (select name_fic from correspondance);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 12:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/table-update-with-condition/m-p/170527#M44067</guid>
      <dc:creator>andy_wk</dc:creator>
      <dc:date>2014-07-08T12:04:16Z</dc:date>
    </item>
  </channel>
</rss>

