<?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: Please Help in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587654#M14720</link>
    <description>It works!! Thank you so much!!</description>
    <pubDate>Tue, 10 Sep 2019 19:42:19 GMT</pubDate>
    <dc:creator>MagD</dc:creator>
    <dc:date>2019-09-10T19:42:19Z</dc:date>
    <item>
      <title>Please Help with SQL syntax error and advice on the correction</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587623#M14716</link>
      <description>&lt;P&gt;Hi All. Please kindly assist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below code:&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table contract_file as&lt;BR /&gt;select&lt;BR /&gt;account_guid as 'CLIENT NUMBER'n,&lt;BR /&gt;case when current_edc = "Blake" then "18811"&lt;BR /&gt;when current_edc = "ARA" then "18810"&lt;BR /&gt;else "18453"&lt;BR /&gt;end as 'MERCHANT NUMBER'n label = 'MERCHANT NUMBER',&lt;BR /&gt;case when pp_opening_invoice_age = "0" as 'CONTRACT NUMBER'n&lt;BR /&gt;end as 'CONTRACT NUMBER'n,&lt;BR /&gt;min(current_balance, installment) as 'AMOUNT'n,&lt;BR /&gt;'1' as 'NUMBER OF INSTALLMENTS'n,&lt;BR /&gt;'ABSANAEDO' as 'PRODUCT CODE'n,&lt;BR /&gt;'O' as 'FREQUENCY'n,&lt;BR /&gt;dhms(next_debit_order_date,0,0,0) as 'DATE'n format dtpic.,&lt;BR /&gt;'03' as 'TRACKING CODE'n,&lt;BR /&gt;'' as 'ED / EOM'n&lt;/P&gt;
&lt;P&gt;from BASE_file;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the below error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;34 case when pp_opening_invoice_age = "0" as 'CONTRACT NUMBER'n&lt;BR /&gt;__&lt;BR /&gt;22&lt;BR /&gt;202&lt;BR /&gt;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, GE, GET,&lt;BR /&gt;GT, GTT, LE, LET, LT, LTT, NE, NET, NOT, OR, THEN, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;
&lt;P&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 19:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587623#M14716</guid>
      <dc:creator>MagD</dc:creator>
      <dc:date>2019-09-10T19:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587651#M14718</link>
      <description>&lt;P&gt;Please paste error messages along with the entire proc code into a code box opened using the forum's {I} icon.&lt;/P&gt;
&lt;P&gt;The main windows on the forum will reformat text. Which moves the underscore from indicating where SAS detected the error it is reporting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likely the issue is having two&lt;/P&gt;
&lt;PRE&gt;as 'CONTRACT NUMBER'n&lt;/PRE&gt;
&lt;P&gt;bits. Only the one after the End of the case should be there.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 19:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587651#M14718</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-10T19:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587652#M14719</link>
      <description>&lt;P&gt;The Error is in the below statement :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when pp_opening_invoice_age = "0" as 'CONTRACT NUMBER'n&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;replace it with something like :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	case 
			when pp_opening_invoice_age = "0" then "xxxxxx" 
		end 
	as 'CONTRACT NUMBER'n,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Log with noexec option without errors :&lt;/P&gt;&lt;PRE&gt;26         proc sql noexec;
27         	create table contract_file as
28         		select
29         			account_guid as 'CLIENT NUMBER'n,
30         		case
31         			when current_edc = "Blake" then "18811"
32         			when current_edc = "ARA" then "18810"
33         			else "18453"
34         		end
35         	as 'MERCHANT NUMBER'n label = 'MERCHANT NUMBER',
36         		case
37         			when pp_opening_invoice_age = "0" then "xxxxxx"
38         		end
39         	as 'CONTRACT NUMBER'n,
40         		min(current_balance, installment) as 'AMOUNT'n,
41         		'1' as 'NUMBER OF INSTALLMENTS'n,
42         		'ABSANAEDO' as 'PRODUCT CODE'n,
43         		'O' as 'FREQUENCY'n,
44         		dhms(next_debit_order_date,0,0,0) as 'DATE'n format dtpic.,
45         		'03' as 'TRACKING CODE'n,
46         		'' as 'ED / EOM'n
47         	from BASE_file;
NOTE: Statement not executed due to NOEXEC option.
48         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      memory              79.62k
      OS Memory           18084.00k&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 19:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587652#M14719</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2019-09-10T19:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587654#M14720</link>
      <description>It works!! Thank you so much!!</description>
      <pubDate>Tue, 10 Sep 2019 19:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Please-Help-with-SQL-syntax-error-and-advice-on-the-correction/m-p/587654#M14720</guid>
      <dc:creator>MagD</dc:creator>
      <dc:date>2019-09-10T19:42:19Z</dc:date>
    </item>
  </channel>
</rss>

