As docs says:
SELECT
CASE WHEN `shipped-on`
IS NOT NULL THEN `shipped-on`
ELSE "not-shipped-yet"
END
AS shipped
FROM orders
This N1QL will result:
{ "shipped": "2013/01/02" },
{ "shipped": "2013/01/12" },
{ "shipped": "not-shipped-yet" },
I want to know how to only show shipped
filed that match condition . such as
{ "shipped": "2013/01/02" },
{ "shipped": "2013/01/12" },
That the field do not match condition don’t show null,just missing it.
where my condition might be a little complex.