I have 2 questions:
Sample data :
[{
"id": "0001",
"type": "donut",
"name": "Cake"
},
{
"id": "0002",
"type": "donut2",
"name": "Cake2"
]
Does azure Stream analytics support nested conditions using the CASE statement ?
Based on my test, it supports nested case conditions.
SQL:
select jsoninput.id as id, jsoninput.type as type ,
case when
((case when jsoninput.id = '0001' then '0' else '1' end) = '0' ) then '0'
else '1' end as res
from jsoninput
Output:
Can anyone give example for the Simple CASE expression?
SQL:
select jsoninput.id as id, jsoninput.type as type ,
case jsoninput.id when '0001' then 'true' else 'false' end as res
from jsoninput
Output: