Re: SQL CASE WHEN THEN ELSE END

Jose Isaias Cabrera <[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <VI1P195MB07651254D95F0BE8961D3F77DE0B0@VI1P195MB0765.EURP195.PROD.OUTLOOK.COM>
Igor Tandetnik, on Sunday, January 26, 2020 09:57 PM, wrote...
>
> 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

Thanks, Igor.

josé
_______________________________________________
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.