{"id":1024,"date":"2021-11-23T10:16:08","date_gmt":"2021-11-23T15:16:08","guid":{"rendered":"https:\/\/folvera.commons.gc.cuny.edu\/?p=1024"},"modified":"2021-12-02T11:44:10","modified_gmt":"2021-12-02T16:44:10","slug":"cuny-ace-upskilling-introduction-to-structured-query-language-sf21job2-day-5","status":"publish","type":"post","link":"https:\/\/folvera.commons.gc.cuny.edu\/?p=1024","title":{"rendered":"CUNY ACE Upskilling: Introduction to Structured Query Language (SF21JOB#2) \u2014 Day 5"},"content":{"rendered":"<p>We continue covering built-in functions and slightly covered the <tt>CASE<\/tt> clause.<\/p>\n<pre><span style=\"color: #0000ff\">    CASE<\/span>\r\n      <span style=\"color: #0000ff\">WHEN<\/span> some_condition_1 <span style=\"color: #0000ff\">THEN<\/span> some_action_1  <span style=\"color: #008000\">-- if this condition fails,\r\n                                                -- need to go to the next one<\/span>\r\n      <span style=\"color: #0000ff\">WHEN<\/span> some_condition_2 <span style=\"color: #0000ff\">THEN<\/span> some_action_2  <span style=\"color: #008000\">-- if this condition fails,\r\n                                                -- need to go to the next one<\/span>\r\n      <span style=\"color: #0000ff\">WHEN<\/span> some_condition_3 <span style=\"color: #0000ff\">THEN<\/span> some_action_3  <span style=\"color: #008000\">-- if this condition fails,\r\n                                                -- need to go to the next one<\/span>\r\n      ...\r\n      <span style=\"color: #0000ff\">ELSE<\/span> escape_action                        <span style=\"color: #008000\">-- if all prior conditions fail,\r\n                                                -- need to perform this action<\/span>\r\n    <span style=\"color: #0000ff\">END\r\n<\/span><\/pre>\n<p>Download the\u00a0<a title=\"Class Notes for SF21JOB2 - Day 5 (2021\/11\/22)\" href=\"https:\/\/folvera.commons.gc.cuny.edu\/wp-content\/blogs.dir\/2501\/files\/2021\/11\/SF21JOB2_20211122.pdf\">class notes<\/a>\u00a0for day 5.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We continue covering built-in functions and slightly covered the CASE clause. CASE WHEN some_condition_1 THEN some_action_1 &#8212; if this condition fails, &#8212; need to go to the next one WHEN some_condition_2 THEN some_action_2 &#8212; if this condition fails, &#8212; need to go to the next one WHEN some_condition_3 THEN some_action_3 &#8212; if this condition fails, [&hellip;]<\/p>\n","protected":false},"author":7213,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"send_to_group_blog":0,"footnotes":""},"categories":[30,3,1,17,2],"tags":[],"class_list":["post-1024","post","type-post","status-publish","format-standard","hentry","category-sf21job2","category-computer-programming","category-cuny","category-open-source","category-sql"],"_links":{"self":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/1024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/users\/7213"}],"replies":[{"embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1024"}],"version-history":[{"count":5,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/1024\/revisions"}],"predecessor-version":[{"id":1051,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/1024\/revisions\/1051"}],"wp:attachment":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}