<?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: Question on in-line views? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554450#M9508</link>
    <description>&lt;PRE&gt;where a.dept=b.maxsal&lt;/PRE&gt;
&lt;P&gt;?? The authors of these questions are very &lt;EM&gt;creative&lt;/EM&gt; indeed&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; &lt;/P&gt;</description>
    <pubDate>Sat, 27 Apr 2019 04:19:47 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-04-27T04:19:47Z</dc:date>
    <item>
      <title>Question on in-line views?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554396#M9498</link>
      <description>&lt;P&gt;While doing practice exams for the Advanced programmer certification I encountered the following question:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;------------------&lt;/P&gt;&lt;P&gt;This question will ask you to provide a segment of missing code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following&amp;nbsp; SAS program is submitted:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql;

select a.name, a.sal, a.dept, b.maxsal

from EMP a,&amp;nbsp;

&amp;lt;insert code here&amp;gt;

where a.dept=b.maxsal

&lt;/PRE&gt;&lt;P&gt;What segment of code will successfully run an in-line view?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A)&lt;/P&gt;&lt;PRE&gt; ( create dept, max(sal) as maxsal
from EMP
group by dept) b&lt;/PRE&gt;&lt;P&gt;B)&lt;/P&gt;&lt;PRE&gt;create ( dept, max(sal) as maxsal
from EMP
group by dept) b&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C)&lt;/P&gt;&lt;PRE&gt;(select dept, max(sal) as maxsal
from EMP
group by dept) b&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;D)&lt;/P&gt;&lt;PRE&gt;select ( dept, max(sal) as maxsal
from EMP
group by dept) b&lt;/PRE&gt;&lt;P&gt;-----------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My intuition here says C, since the SELECT statement always seems to be made inside the parenthesis. But the correct answer&lt;/P&gt;&lt;P&gt;seems to be D. Am I missing something and in that case what?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 20:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554396#M9498</guid>
      <dc:creator>Syntas_error</dc:creator>
      <dc:date>2019-04-26T20:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Question on in-line views?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554408#M9503</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/254512"&gt;@Syntas_error&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't let typos in prep guides (or wherever D was stated to be the correct answer) confuse you. Of course, only C is correct. You can test it with a simple example (e.g. a single obs. with all variables 0).&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 21:11:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554408#M9503</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-04-26T21:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Question on in-line views?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554450#M9508</link>
      <description>&lt;PRE&gt;where a.dept=b.maxsal&lt;/PRE&gt;
&lt;P&gt;?? The authors of these questions are very &lt;EM&gt;creative&lt;/EM&gt; indeed&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; &lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 04:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554450#M9508</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-04-27T04:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Question on in-line views?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554455#M9509</link>
      <description>&lt;P&gt;"sigh"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know for a fact that question is part of the actual exam, there's a very realy chance I will have to "memorize" a number of these typos which feels incredibly backwards ^^&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 06:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554455#M9509</guid>
      <dc:creator>Syntas_error</dc:creator>
      <dc:date>2019-04-27T06:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Question on in-line views?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554456#M9510</link>
      <description>&lt;P&gt;So only the inner query (that is to say the in-line view) executes when the outer query fails?&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 06:02:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554456#M9510</guid>
      <dc:creator>Syntas_error</dc:creator>
      <dc:date>2019-04-27T06:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question on in-line views?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554711#M9554</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/254512"&gt;@Syntas_error&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So only the inner query (that is to say the in-line view) executes when the outer query fails?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you asked me, I'd rather say: The inline view can be thought of as a virtual table which is created "on the fly" and then immediately used in the implicit join that constitutes the outer query. The result is the same as if that table had been created physically as a named SAS dataset in a preliminary PROC SQL step (using the code of the inline view).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the outer query fails because of, say, a non-existing variable or table or a syntax error, this will be noticed during compilation already, so the inner query will &lt;EM&gt;not&lt;/EM&gt; be executed in this case.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 14:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/554711#M9554</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-04-29T14:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Question on in-line views?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/556043#M9753</link>
      <description>C is correct for sure. The answers given are not always correct sometimes, i know this when preparing for the SAS certification exams.</description>
      <pubDate>Fri, 03 May 2019 18:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-on-in-line-views/m-p/556043#M9753</guid>
      <dc:creator>DMIN</dc:creator>
      <dc:date>2019-05-03T18:37:25Z</dc:date>
    </item>
  </channel>
</rss>

