About 1,300,000 results
Open links in new tab
  1. Case statement multiple conditions - SAS Support Communities

    Jul 7, 2021 · How to I use AND for multiple conditions on different data columns? I'm working in SAS EG 7.1. case when XXX_ALL_DIM.lif_IND = 1 then 'Yes' when YYY_ALL_DIM.lif_IND = 2 then 'No' …

  2. sql - How to execute multiple case when statements for each iteration ...

    Oct 26, 2016 · I'm using proc sql, and using multiple case when statements to add columns with either a 0 or 1 if the condition is met. It's a big bottleneck right now since it has to scan through each id for …

  3. The SQL® procedure supports conditionally selecting result values from rows in a table (or view) in the form of a case expression. Similar to an IF-THEN construct in the DATA step, a case expression …

  4. SAS CASE WHEN Statement: Learn with Examples - ListenData

    In this tutorial, we will see how to use CASE WHEN statement in SAS using PROC SQL. In PROC SQL, you can use the CASE WHEN statement to perform conditional logic and manipulate data based on …

  5. A guide to Proc SQL Case When Statement - 9TO5SAS

    Jan 31, 2023 · Today, let’s dive into the magical world of the Proc SQL Case When Statement in SAS. Trust me, it’s a game-changer! The CASE statement will allow you to implement if-else in SQL, so …

  6. How to Use a CASE WHEN Statement in SAS (With Examples)

    Jan 17, 2022 · We can use the CASE statement in SAS to create a new variable that uses case-when logic to determine the values to assign to the new variable. This statement uses the following basic …

  7. SQL CASE Expression - W3Schools

    The SQL CASE Expression The CASE expression goes through conditions and returns a value when the first condition is met (like an if-then-else statement). So, once a condition is true, it will stop …

  8. PROC SQL: CASE expression - SAS Support

    The CASE expression selects values if certain conditions are met. A CASE expression returns a single value that is conditionally evaluated for each row of a table (or view).

  9. How To Easily Implement CASE WHEN Statements In SAS

    Dec 1, 2025 · This article will serve as a comprehensive guide, illustrating the fundamental structure and practical application of the CASE WHEN statement within the PROC SQL procedure in SAS.

  10. How can I use Proc Sql 'Case When' Conditional for Multiple Rows of ...

    Oct 3, 2023 · I want to create a three indicators for a variable. I have a dataset that looks like this:- I want to account for when I have two rows with the same ID with different values in the column, Color …