Re: SQL CASE WHEN THEN ELSE END

Igor Tandetnik <[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <[email protected]>
On 1/26/2020 9:44 PM, Jose Isaias Cabrera wrote:
>      CASE
>      (
>            SELECT WYear FROM t2 WHERE pid = a.a
>      )
>      WHEN c.WYear = 2020 THEN “YES”
>      ELSE “NO” END
> ) AS DIGITAL

This should probably be simply

case c.WYear when 2020 then 'YES' else 'NO' end

or equivalently

case when c.WYear=2020 then 'YES' else 'NO' end

-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.