Andy Goth wrote:
> The expression "x = NULL" is meaningless since it will always evaluate
> to NULL, which CASE interprets as untruth, hence "WHEN NULL THEN" will
> never accomplish anything.
> [...]
> So I'm wondering: can we do better?

The expression "x = x" will fail for NULL, but succeed for everything
else.  So you can use that to implement a "not-NULL ELSE":

CASE x
WHEN 1 THEN ...
WHEN x THEN 'not NULL'
ELSE        'NULL'
END


> [...]
> The next evolution in bloat is to also support AND, OR, NOT, and
> parentheses, allowing the LHS operand of any operator in a complex
> expression to be omitted

So you want to have your beloved COBOL features in SQL?  ;-)
http://www.3kranger.com/HP3000/mpeix/doc3k/B3150090013.11820/65.htm
http://www.csis.ul.ie/cobol/course/Selection.htm


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to