<?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 79-322: Expecting a SELECT. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823216#M41074</link>
    <description>&lt;P&gt;The IN operator requires a list of values appearing inside ( ), even for a single value in general.&lt;/P&gt;
&lt;P&gt;Where you use "Type in TIN" and there is no (&amp;nbsp; then Proc SQL is expecting a sub-query starting with SELECT to provide the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run these two steps and see if the second comes closer to what you expected given the small size of SASHELP.CLASS.&lt;/P&gt;
&lt;PRE&gt;Proc sql;
   select *
   from sashelp.class
   where sex in F
   ;
quit;

Proc sql;
   select *
   from sashelp.class
   where sex in ('F')
   ;
quit;



&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Jul 2022 19:29:34 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-07-13T19:29:34Z</dc:date>
    <item>
      <title>ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823201#M41068</link>
      <description>&lt;P&gt;Not sure what this means. I'm trying to get list of IDs but I get an error.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
23         proc sql;
24         create table data
25         as select
26         a.*,
27         b.Type,
28         b.ID
29         from A inner join B
30         on a.npi=b.id
31         where Type in TIN and
                                   ___
                                   79
                                   76
ERROR 79-322: Expecting a SELECT.

ERROR 76-322: Syntax error, statement will be ignored.

32         ID in ('111111111' '222222222' '333333333' '66666666' '77777777');
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
34         quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823201#M41068</guid>
      <dc:creator>bhca60</dc:creator>
      <dc:date>2022-07-13T19:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823203#M41069</link>
      <description>&lt;P&gt;SHould this be your query?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;         proc sql;
         create table data
         as select
         a.*,
         b.Type,
         b.ID
         from A inner join B
         on a.npi=b.provnpi
         where Type = TIN
         and b.ID in ('111111111' '222222222' '333333333' '66666666' '77777777');                               
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you may want to provide alias on your variables in the WHERE clause, ie b.ID or a.ID as appropriate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 18:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823203#M41069</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-07-13T18:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823204#M41070</link>
      <description>&lt;P&gt;Is TIN a value or a variable name?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 18:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823204#M41070</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-13T18:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823206#M41071</link>
      <description>&lt;P&gt;its an ID number - its a character&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823206#M41071</guid>
      <dc:creator>bhca60</dc:creator>
      <dc:date>2022-07-13T19:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823208#M41072</link>
      <description>&lt;P&gt;i changed it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823208#M41072</guid>
      <dc:creator>bhca60</dc:creator>
      <dc:date>2022-07-13T19:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823216#M41074</link>
      <description>&lt;P&gt;The IN operator requires a list of values appearing inside ( ), even for a single value in general.&lt;/P&gt;
&lt;P&gt;Where you use "Type in TIN" and there is no (&amp;nbsp; then Proc SQL is expecting a sub-query starting with SELECT to provide the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run these two steps and see if the second comes closer to what you expected given the small size of SASHELP.CLASS.&lt;/P&gt;
&lt;PRE&gt;Proc sql;
   select *
   from sashelp.class
   where sex in F
   ;
quit;

Proc sql;
   select *
   from sashelp.class
   where sex in ('F')
   ;
quit;



&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823216#M41074</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-07-13T19:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823218#M41075</link>
      <description>I tried = sign and it gave an error to that as well which is why I did the IN operator.</description>
      <pubDate>Wed, 13 Jul 2022 19:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823218#M41075</guid>
      <dc:creator>bhca60</dc:creator>
      <dc:date>2022-07-13T19:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823220#M41076</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
        CREATE TABLE data AS
         SELECT a.*, b.Type, b.ID
         FROM A inner join B
         ON a.npi=b.provnpi
         WHERE Type in (select TIN from a) /* not sure a or b */
         and b.ID in ('111111111' '222222222' '333333333' '66666666' '77777777')
;   
quit;      &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823220#M41076</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2022-07-13T19:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823223#M41077</link>
      <description>&lt;P&gt;Where is TIN coming from?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823223#M41077</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-07-13T19:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 79-322: Expecting a SELECT.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823234#M41078</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/290946"&gt;@bhca60&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;its an ID number - its a character&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You have not answered my question. Is it a variable named TIN or the value "TIN"?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 21:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-79-322-Expecting-a-SELECT/m-p/823234#M41078</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-13T21:31:53Z</dc:date>
    </item>
  </channel>
</rss>

