view elpa/sql-indent-1.4/test-data/case-stmt.sql @ 198:542bdd6b7739

sql-indent: replace with newer ELPA version
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Sun, 08 Dec 2019 14:39:27 -0500
parents
children
line wrap: on
line source

-- https://github.com/bsvingen/sql-indent/issues/1
SELECT y ,
       CASE
       WHEN foo>5 THEN "great"
       WHEN foo=5 THEN "normal"
       ELSE "poor"
       END AS level
  FROM bar;

var := CASE
        var                             -- tricky case
       WHEN foo>5 THEN "great"
       WHEN foo=5 THEN "normal"
       ELSE "poor"
       END;