Simon Slavin, on Sunday, January 26, 2020 09:59 PM, wrote... > > On 27 Jan 2020, at 2:44am, Jose Isaias Cabrera <jic...@outlook.com> > wrote: > > > CASE > > ( > > SELECT WYear FROM t2 WHERE pid = a.a > > ) > > WHEN c.WYear = 2020 THEN “YES” > > ELSE “NO” END > > That's not the structure of a CASE statement. > > After CASE comes an expression. > After WHEN comes another expression. > If they equal one another, then the the bit after the THEN is returned. > > You want something more like > > SELECT > (CASE WYear WHEN 2020 THEN 'YES' ELSE 'NO' END) AS DIGITAL > FROM t2 WHERE pid = a.a > > but you'll have to fit this in with how your overall SELECT works. > > Sse "The CASE expression" on this page for more details: > > <https://sqlite.org/lang_expr.html>
Thanks. josé _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users