<?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: ERROR: Subquery evaluated to more than one row. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458654#M116419</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
alter table dash.fruits
add type char(30) format = $30.;
update dash.fruits as A
set Type = (select DISTINCT b.type from dash.category as b
                  where A.id=b.id);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Apr 2018 14:18:15 GMT</pubDate>
    <dc:creator>emrancaan</dc:creator>
    <dc:date>2018-04-30T14:18:15Z</dc:date>
    <item>
      <title>ERROR: Subquery evaluated to more than one row.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458641#M116415</link>
      <description>&lt;P&gt;Can you please help: i want to create a new column with type for matching Id. I am getting the error as&amp;nbsp; ERROR: Subquery evaluated to more than one row&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc sql;&lt;BR /&gt;alter table dash.fruits&lt;BR /&gt;add type char(30) format = $30.;&lt;BR /&gt;update dash.fruits as A&lt;BR /&gt;set Type = (select b.type from dash.category as b&lt;BR /&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; where A.id-b.id);&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 14:03:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458641#M116415</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-04-30T14:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Subquery evaluated to more than one row.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458644#M116416</link>
      <description>&lt;P&gt;Did you mean:&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;where A.id =&lt;/SPAN&gt;&lt;/STRONG&gt; b.id); - you have a hyphen instead equal sign.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 14:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458644#M116416</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-04-30T14:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Subquery evaluated to more than one row.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458647#M116417</link>
      <description>&lt;P&gt;oops typo. i still got the same error&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 14:10:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458647#M116417</guid>
      <dc:creator>radha009</dc:creator>
      <dc:date>2018-04-30T14:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Subquery evaluated to more than one row.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458648#M116418</link>
      <description>&lt;P&gt;The error tells you everything you need to know, the subquery:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;(select b.type from dash.category as b&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; where A.id-b.id)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Returned more than one row of data.&amp;nbsp; Check in dash.category, maybe you have duplicate rows, or more than one merge on id.&amp;nbsp; This is where showing some test data in the form of a datastep really helps!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 14:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458648#M116418</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-04-30T14:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Subquery evaluated to more than one row.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458654#M116419</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
alter table dash.fruits
add type char(30) format = $30.;
update dash.fruits as A
set Type = (select DISTINCT b.type from dash.category as b
                  where A.id=b.id);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Apr 2018 14:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Subquery-evaluated-to-more-than-one-row/m-p/458654#M116419</guid>
      <dc:creator>emrancaan</dc:creator>
      <dc:date>2018-04-30T14:18:15Z</dc:date>
    </item>
  </channel>
</rss>

