<?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 22-322: Syntax error in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718952#M38157</link>
    <description>I'm getting an error that says yearPortion was a column not found in the contributing tables.&lt;BR /&gt;"ERROR: The following columns were not found in the contributing tables: yearPortion."</description>
    <pubDate>Fri, 12 Feb 2021 17:33:39 GMT</pubDate>
    <dc:creator>izzytetteh24</dc:creator>
    <dc:date>2021-02-12T17:33:39Z</dc:date>
    <item>
      <title>ERROR 22-322: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718946#M38155</link>
      <description>&lt;P&gt;SELECT IIf([Group]="07M","GWB","EIA") &amp;amp; IIf(Left([ISSUE_DATE],4) &amp;lt;"2003","2003",Left([ISSUE_DATE],4)) AS IY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IY&lt;/P&gt;&lt;TABLE border="1" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2003&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2004&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2005&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2006&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2007&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2008&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2009&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2010&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2011&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2012&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2013&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2014&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2015&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2016&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2017&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2018&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2019&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;EIA2020&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;GWB2016&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;GWB2017&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;GWB2018&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;GWB2019&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="Calibri" color="#000000"&gt;GWB2020&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CASE WHEN EPLAN.Group = "07M" THEN "GWB"&lt;BR /&gt;5665 ELSE "EIA"&lt;BR /&gt;5666 AND WHEN YEAR(ISSUE_DATE) &amp;lt; 2003 THEN 2003&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;____&lt;BR /&gt;22&lt;BR /&gt;76&lt;/P&gt;&lt;P&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, BETWEEN,&lt;BR /&gt;CONTAINS, EQ, EQT, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;5667 ELSE YEAR(ISSUE_DATE)&lt;BR /&gt;5668 END AS IY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm in need of some assistance. At the very top of this post is the SQL code that I'm trying to replicate. The IY field that's created is the column that follows and the SAS code that I'm running comes last. I'm not sure how to create this nested if formula using the CASE WHEN function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 17:01:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718946#M38155</guid>
      <dc:creator>izzytetteh24</dc:creator>
      <dc:date>2021-02-12T17:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718951#M38156</link>
      <description>What is the type of your variable ISSUE_DATE?&lt;BR /&gt;If it's not numeric with a date format, then it's not a SAS date and you need to sue text functions similar to what you did in Excel. &lt;BR /&gt;&lt;BR /&gt;In the future, please show the code you actually submitted, not just the Excel code or log. It's possible to do this in one step but &lt;BR /&gt;&lt;BR /&gt;CASE when substr(year,1,4) &amp;lt; 2003 then 2003&lt;BR /&gt;else substr(issue_date, 1, 4) end as yearPortion,&lt;BR /&gt;CASE WHEN EPLAN.Group = "07M"  THEN catt("GWB", yearPortion)&lt;BR /&gt;ELSE catt("EIA", yearPortion)&lt;BR /&gt;END as IY&lt;BR /&gt;&lt;BR /&gt;Your CASE syntax is incorrect.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Feb 2021 17:25:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718951#M38156</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-12T17:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718952#M38157</link>
      <description>I'm getting an error that says yearPortion was a column not found in the contributing tables.&lt;BR /&gt;"ERROR: The following columns were not found in the contributing tables: yearPortion."</description>
      <pubDate>Fri, 12 Feb 2021 17:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718952#M38157</guid>
      <dc:creator>izzytetteh24</dc:creator>
      <dc:date>2021-02-12T17:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718953#M38158</link>
      <description>&lt;BR /&gt;CASE when substr(year,1,4) &amp;lt; 2003 then 2003&lt;BR /&gt;else substr(issue_date, 1, 4) end as yearPortion,&lt;BR /&gt;CASE WHEN EPLAN.Group = "07M" THEN catt("GWB", calculated yearPortion)&lt;BR /&gt;ELSE catt("EIA",  calculated yearPortion)&lt;BR /&gt;END as IY</description>
      <pubDate>Fri, 12 Feb 2021 17:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-22-322-Syntax-error/m-p/718953#M38158</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-12T17:38:14Z</dc:date>
    </item>
  </channel>
</rss>

