<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <pre>Hi,</pre>
    <pre>maybe it's again some strange local issue, but I can't find a way to make CASE WHEN working in a DB Manger query or in a Vitual Layer.</pre>
    <pre>The example is analog to <a class="moz-txt-link-freetext" href="https://www.sqlitetutorial.net/sqlite-case/">https://www.sqlitetutorial.net/sqlite-case/</a>
I would like to populate a new column "category" in that select</pre>
    <pre>
</pre>
    <pre>SELECT *</pre>
    <pre>CASE WHEN status = 'v' THEN 'v'</pre>
    <pre> ELSE 'nv'</pre>
    <pre>END category </pre>
    <pre>FROM </pre>
    <pre>table;

</pre>
    <pre>Whatever I try, the result is always a:</pre>
    <pre>near "CASE": syntax error</pre>
    <pre>This should have been the preparation for a much more complex query, but I even fail at the start :(</pre>
    <pre>Any ideas whats wrong?</pre>
    <pre>Cheers,</pre>
    <pre>Bernd</pre>
    <pre><span style=" font-family:'Monospace';"></span></pre>
    <pre><style type="text/css">
p, li { white-space: pre-wrap; }
</style></pre>
  </body>
</html>