<?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 Terminology of CASE expressions in SAS SQL I Essentials videos in SAS Certification</title>
    <link>https://communities.sas.com/t5/SAS-Certification/Terminology-of-CASE-expressions-in-SAS-SQL-I-Essentials-videos/m-p/985115#M1907</link>
    <description>&lt;P&gt;I'm working through the SAS SQL I: Essentials training videos and I'm a bit confused about the terminology of the two different forms of the CASE expressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how the video/course materials describe the "simple expression":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Let's start with the standard form CASE expression, or simple CASE expression. With this syntax, you can use equality and non-equality tests for validity.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="10"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;&lt;STRONG&gt;SELECT&amp;nbsp;&lt;/STRONG&gt;col-name, col-name&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;CASE&amp;nbsp;&lt;/STRONG&gt;&amp;lt;case-operand&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&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;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;WHEN&amp;nbsp;&lt;/STRONG&gt;when-condition&amp;nbsp;&lt;STRONG&gt;THEN&lt;/STRONG&gt;&amp;nbsp;result-expression&lt;/EM&gt;&lt;BR /&gt;&lt;EM&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;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;STRONG&gt;WHEN&amp;nbsp;&lt;/STRONG&gt;when-condition&amp;nbsp;&lt;STRONG&gt;THEN&lt;/STRONG&gt;&amp;nbsp;result-expression...&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;STRONG&gt;ELSE&amp;nbsp;&lt;/STRONG&gt;result-expression&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;END&amp;nbsp;&lt;/STRONG&gt;&amp;lt;&lt;STRONG&gt;AS&amp;nbsp;&lt;/STRONG&gt;column&amp;gt;&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "case-operand form" is then described as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"You can also construct a CASE expression by using the CASE-OPERAND form. You specify the condition as the case-operand once at the top of the CASE expression, followed by a series of WHEN-THEN clauses. Here, we select the Married column, and based on the values, we assign them to a specified category.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When you use the CASE-OPERAND form of the CASE expression, the conditions must all be equality tests. That is, they cannot use comparison operators or other types of operators."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unless I'm mistaken, it seems that this distinction between "simple form" versus "case-operand form" is different than the "simple case" versus "searched case" forms used in other SQL variants.&amp;nbsp;For example, what the SAS training calls "simple form" corresponds to the "searched case" form and the "case-operand form" corresponds to the "simple case form" as documented by the ANSI-compliant IBM DB product:&amp;nbsp; &lt;A href="https://www.ibm.com/docs/en/db2-warehouse?topic=statements-case-statement-in-sql-procedures" target="_blank" rel="noopener"&gt;https://www.ibm.com/docs/en/db2-warehouse?topic=statements-case-statement-in-sql-procedures&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS 9.4 documentation doesn't appear to make the distinction between "simple form" and "case-operand form." It seems confusing to call them that in the training/videos when these definitions don't adhere to more standard SQL terminology.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Mar 2026 17:34:18 GMT</pubDate>
    <dc:creator>hcstritz</dc:creator>
    <dc:date>2026-03-22T17:34:18Z</dc:date>
    <item>
      <title>Terminology of CASE expressions in SAS SQL I Essentials videos</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Terminology-of-CASE-expressions-in-SAS-SQL-I-Essentials-videos/m-p/985115#M1907</link>
      <description>&lt;P&gt;I'm working through the SAS SQL I: Essentials training videos and I'm a bit confused about the terminology of the two different forms of the CASE expressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how the video/course materials describe the "simple expression":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Let's start with the standard form CASE expression, or simple CASE expression. With this syntax, you can use equality and non-equality tests for validity.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" cellspacing="0" cellpadding="10"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;&lt;STRONG&gt;SELECT&amp;nbsp;&lt;/STRONG&gt;col-name, col-name&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;CASE&amp;nbsp;&lt;/STRONG&gt;&amp;lt;case-operand&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&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;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;WHEN&amp;nbsp;&lt;/STRONG&gt;when-condition&amp;nbsp;&lt;STRONG&gt;THEN&lt;/STRONG&gt;&amp;nbsp;result-expression&lt;/EM&gt;&lt;BR /&gt;&lt;EM&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;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;STRONG&gt;WHEN&amp;nbsp;&lt;/STRONG&gt;when-condition&amp;nbsp;&lt;STRONG&gt;THEN&lt;/STRONG&gt;&amp;nbsp;result-expression...&amp;gt;&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;&amp;nbsp;&amp;nbsp;&amp;lt;&lt;STRONG&gt;ELSE&amp;nbsp;&lt;/STRONG&gt;result-expression&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;END&amp;nbsp;&lt;/STRONG&gt;&amp;lt;&lt;STRONG&gt;AS&amp;nbsp;&lt;/STRONG&gt;column&amp;gt;&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "case-operand form" is then described as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"You can also construct a CASE expression by using the CASE-OPERAND form. You specify the condition as the case-operand once at the top of the CASE expression, followed by a series of WHEN-THEN clauses. Here, we select the Married column, and based on the values, we assign them to a specified category.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When you use the CASE-OPERAND form of the CASE expression, the conditions must all be equality tests. That is, they cannot use comparison operators or other types of operators."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unless I'm mistaken, it seems that this distinction between "simple form" versus "case-operand form" is different than the "simple case" versus "searched case" forms used in other SQL variants.&amp;nbsp;For example, what the SAS training calls "simple form" corresponds to the "searched case" form and the "case-operand form" corresponds to the "simple case form" as documented by the ANSI-compliant IBM DB product:&amp;nbsp; &lt;A href="https://www.ibm.com/docs/en/db2-warehouse?topic=statements-case-statement-in-sql-procedures" target="_blank" rel="noopener"&gt;https://www.ibm.com/docs/en/db2-warehouse?topic=statements-case-statement-in-sql-procedures&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS 9.4 documentation doesn't appear to make the distinction between "simple form" and "case-operand form." It seems confusing to call them that in the training/videos when these definitions don't adhere to more standard SQL terminology.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Mar 2026 17:34:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Terminology-of-CASE-expressions-in-SAS-SQL-I-Essentials-videos/m-p/985115#M1907</guid>
      <dc:creator>hcstritz</dc:creator>
      <dc:date>2026-03-22T17:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Terminology of CASE expressions in SAS SQL I Essentials videos</title>
      <link>https://communities.sas.com/t5/SAS-Certification/Terminology-of-CASE-expressions-in-SAS-SQL-I-Essentials-videos/m-p/985121#M1908</link>
      <description>&lt;P&gt;I could not find the old original ANSI Standard SQL from 1992 that SAS PROC SQL is based on to check, but it looks like you are right that others are applying the term "simple" (usually in quotes) to the expression/value version of the CASE syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally I don't find either of them simple, but in my experience the version where each WHEN clause has a boolean expression instead of a value is the "normal" way that CASE expressions are used.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Mar 2026 23:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Certification/Terminology-of-CASE-expressions-in-SAS-SQL-I-Essentials-videos/m-p/985121#M1908</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-03-22T23:24:28Z</dc:date>
    </item>
  </channel>
</rss>

