<?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: Update a table with values from a different table in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Update-a-table-with-values-from-a-different-table/m-p/98367#M27680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe your error is from the UPDATE statement :&lt;/P&gt;&lt;P&gt;You need use sub-query to obtain the obs you need to be updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;update&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; work.p_kontoAgg_rest2 as k&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.rwa = (select summe_rwa from p_isin_gruppen as i &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=i.isin and k.Kusa = i.Kusa)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=(select isin from &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;p_isin_gruppen as i &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=i.isin and k.Kusa = i.Kusa) and k.kusa =(select kusa from &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;p_isin_gruppen as i &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=i.isin and k.Kusa = i.Kusa)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;Ksharp&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Aug 2012 02:46:28 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2012-08-21T02:46:28Z</dc:date>
    <item>
      <title>Update a table with values from a different table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-a-table-with-values-from-a-different-table/m-p/98365#M27678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in order to update a table with values from a different table I followed the description in...:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/viewer.htm#a002595787.htm"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/62086/HTML/default/viewer.htm#a002595787.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;STRONG style="mso-fareast-language: DE; color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; &lt;/SPAN&gt;&lt;STRONG style="mso-fareast-language: DE; color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;sql&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; font-family: 'Courier New'; mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;delete&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;from&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; p_kontoAGG_rest2 as k&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; isin in (select isin &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;from&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; p_isin_mult) &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;&lt;SPAN style="mso-tab-count: 4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;and kusa in (select distinct kusa &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;from&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; p_isin_gruppe_join) and c200 not in (select c200 &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;from&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; output);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;update&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; work.p_kontoAgg_rest2 as k&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;set&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; k.rwa = (select summe_rwa from p_isin_gruppen as i &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; k.isin=i.isin and k.Kusa = i.Kusa)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: black; background: white; font-size: 10pt; mso-ansi-language: EN-GB; font-family: 'Courier New'; mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: blue; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; k.isin=i.isin and k.kusa = i.kusa;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;STRONG style="mso-fareast-language: DE; color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I got the following error... What did I do wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;14&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt;15&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;/* Entfernung der Datensätze, deren RWA auf eine andere Position aufgeschlagen wird */&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;16&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;delete from p_kontoAGG_rest2 as k&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;17&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;where isin in (select isin from p_isin_mult)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;18&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;and kusa in (select distinct kusa from p_isin_gruppe_join) and c200 not in (select c200 from output);&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: green; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;NOTE: No rows were deleted from WORK.P_KONTOAGG_REST2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;19&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;20&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;update p_kontoAgg_rest2 as k&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;21&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;set k.rwa = (select summe_rwa from p_isin_gruppen as i where k.isin=i.isin and k.Kusa = i.Kusa)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="mso-fareast-language: DE; color: red; background: white; font-size: 10pt; mso-ansi-language: EN-GB; mso-spacerun: yes; font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt; mso-fareast-language: DE;"&gt;_&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt; mso-fareast-language: DE;"&gt;&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;73&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt; mso-fareast-language: DE;"&gt;&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;76&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt; mso-fareast-language: DE;"&gt;ERROR 73-322: Expecting an =.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 10pt; mso-fareast-language: DE;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: white; color: red; font-size: 10pt; mso-fareast-language: DE; mso-ansi-language: EN-GB;"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="mso-ansi-language: EN-GB;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx, S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 11:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-a-table-with-values-from-a-different-table/m-p/98365#M27678</guid>
      <dc:creator>sfmeier</dc:creator>
      <dc:date>2012-08-20T11:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Update a table with values from a different table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-a-table-with-values-from-a-different-table/m-p/98366#M27679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that it is actually complaining about the use of the alias prefix on the name of the variable to be updated.&lt;/P&gt;&lt;P&gt;Instead of K.RWA = ... just write RWA = ...&amp;nbsp; Here is an example that generates the same error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;212&amp;nbsp; proc sql ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;213&amp;nbsp;&amp;nbsp;&amp;nbsp; update a&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;214&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set a.age=(select age from b where a.name = b.name)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 73&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;ERROR 73-322: Expecting an =.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;215&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;216&amp;nbsp; quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The alias is not needed since you can only make changes to the variables in the table named in the UPDATE clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 16:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-a-table-with-values-from-a-different-table/m-p/98366#M27679</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-08-20T16:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Update a table with values from a different table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Update-a-table-with-values-from-a-different-table/m-p/98367#M27680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe your error is from the UPDATE statement :&lt;/P&gt;&lt;P&gt;You need use sub-query to obtain the obs you need to be updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;update&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; work.p_kontoAgg_rest2 as k&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.rwa = (select summe_rwa from p_isin_gruppen as i &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=i.isin and k.Kusa = i.Kusa)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=(select isin from &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;p_isin_gruppen as i &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=i.isin and k.Kusa = i.Kusa) and k.kusa =(select kusa from &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;p_isin_gruppen as i &lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: blue; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt; k.isin=i.isin and k.Kusa = i.Kusa)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-GB" style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: none repeat scroll 0% 0% white; font-family: 'Courier New';"&gt;quit&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: none repeat scroll 0% 0% white; color: black; font-size: 10pt;"&gt;Ksharp&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 02:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Update-a-table-with-values-from-a-different-table/m-p/98367#M27680</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-08-21T02:46:28Z</dc:date>
    </item>
  </channel>
</rss>

