CUNY ACE Upskilling: Introduction to Structured Query Language (SF21JOB#2) — Day 5

We continue covering built-in functions and slightly covered the CASE clause.

    CASE
      WHEN some_condition_1 THEN some_action_1  -- if this condition fails,
                                                -- need to go to the next one
      WHEN some_condition_2 THEN some_action_2  -- if this condition fails,
                                                -- need to go to the next one
      WHEN some_condition_3 THEN some_action_3  -- if this condition fails,
                                                -- need to go to the next one
      ...
      ELSE escape_action                        -- if all prior conditions fail,
                                                -- need to perform this action
    END

Download the class notes for day 5.

Database Administration Fundamentals (SF21SQL1001) – Day 3

We continue manipulating data (without making changes in the database). We have covered functions that affect strings and numeric values — including `FORMAT()` to change currency and date values.

  FORMAT(numeric_value, format_needed, culture)
  FORMAT(numeric_value_money, 'c', 'en-us')
  FORMAT(numeric_value_date,  'd', 'en-us')
  FORMAT(numeric_value_date,  'D', 'en-us')

Download the class notes for day 3.