<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Ok, sorry for the noise!<br>
      comma missing after select *</p>
    <p>SQL and me not going to be good friends</p>
    <p>Cheers,<br>
      Bernd<br>
    </p>
    <div class="moz-cite-prefix">Am 07.12.19 um 18:47 schrieb Bernd
      Vogelgesang:<br>
    </div>
    <blockquote type="cite"
      cite="mid:01774722-354a-33d9-d14f-c22a4700c6b0@gmx.de">Hi,
      <br>
      <br>
      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.
      <br>
      <br>
      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>
      <br>
      I would like to populate a new column "category" in that select
      <br>
      <br>
      SELECT *
      <br>
      <br>
      CASE WHEN status = 'v' THEN 'v'
      <br>
      <br>
          ELSE 'nv'
      <br>
      <br>
      END category
      <br>
      <br>
      FROM
      <br>
      <br>
      table;
      <br>
      <br>
      Whatever I try, the result is always a:
      <br>
      <br>
      near "CASE": syntax error
      <br>
      <br>
      This should have been the preparation for a much more complex
      query, but I even fail at the start :(
      <br>
      <br>
      Any ideas whats wrong?
      <br>
      <br>
      Cheers,
      <br>
      <br>
      Bernd
      <br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
    </blockquote>
  </body>
</html>