<?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: Syntax error in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817431#M34517</link>
    <description>&lt;P&gt;You must use the IN operator to compare a value with a list:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where accountstatus in ('Campaign','Chase','Chase Hold','Paying')&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 10 Jun 2022 10:49:05 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-06-10T10:49:05Z</dc:date>
    <item>
      <title>Syntax error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817429#M34516</link>
      <description>&lt;P&gt;Hi Expert,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure about the syntax error. I think my code is correct but getting error.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
create table Chase_Linked as
	select distinct *
		from Address_Check
			where accountstatus = 'Campaign','Chase','Chase Hold','Paying';

create table Chase_Linked2 as
	select distinct *,
					sum(Postcode_Check) as Acc_Check,
					count(debt_code) as Linked_Count
		from Chase_Linked
			group by icustomerid;

create table Chase_Linked3 as 
	select distinct *,
		case when sum(Acc_Check) = sum(Linked_Count) then 'Y' else 'N'
			end as Cust_Check
				from Chase_Linked2
					group by icustomerid;

create table Trace_Chase_Linked as
	select distinct(Trace_Acc),
					Trace_Rep,
					Trace_Status
		from Chase_Linked3
			where Cust_Check = 'Y';
quit;

Error log:

30         proc sql;
31         create table Chase_Linked as
32         	select distinct *
33         		from Address_Check
34         			where accountstatus = 'Campaign','Chase','Chase Hold','Paying';
                                              _
                                              22
                                              76
ERROR 22-322: Syntax error, expecting one of the following: ;, !, !!, &amp;amp;, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, AND, EQ, EQT, EXCEPT, 
              GE, GET, GROUP, GT, GTT, HAVING, INTERSECT, LE, LET, LT, LTT, NE, NET, NOT, OR, ORDER, OUTER, UNION, ^, ^=, |, ||, ~, 
              ~=.  

ERROR 76-322: Syntax error, statement will be ignored.

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
35         
36         create table Chase_Linked2 as
37         	select distinct *,
38         					sum(Postcode_Check) as Acc_Check,
39         					count(debt_code) as Linked_Count
40         		from Chase_Linked
41         			group by icustomerid;
NOTE: Statement not executed due to NOEXEC option.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can you please check the code and error log to find it?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 10:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817429#M34516</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-06-10T10:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817431#M34517</link>
      <description>&lt;P&gt;You must use the IN operator to compare a value with a list:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where accountstatus in ('Campaign','Chase','Chase Hold','Paying')&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jun 2022 10:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817431#M34517</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-10T10:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817434#M34518</link>
      <description>&lt;P&gt;Thank you for your response and I did the way you suggested but still getting this error.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;30         proc sql;
31         create table Chase_Linked as
32         	select distinct *
33         		from Address_Check
34         			where accountstatus in 'Campaign','Chase','Chase Hold','Paying';
                                     __________                              _
                                     22                                      79
ERROR 22-322: Syntax error, expecting one of the following: (, SELECT.  

ERROR 79-322: Expecting a ).

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jun 2022 11:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817434#M34518</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-06-10T11:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817435#M34519</link>
      <description>&lt;P&gt;Look at the code I gave you and pay attention to details. It is obvious from the ERROR message you got, the message literally tells you what's missing.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 11:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817435#M34519</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-10T11:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817436#M34520</link>
      <description>Thank you. I found it. That was great help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 10 Jun 2022 11:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Syntax-error/m-p/817436#M34520</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-06-10T11:45:54Z</dc:date>
    </item>
  </channel>
</rss>

