CASE
WHEN
BIND_FILTERS (
"_Q_CASES" ,
"vw_IPM"."AFO_Nummer" LIKE 'aa-%' AND
"vw_IPM"."Status_Verschraubung" = 'niO'
)
THEN
'niO'
WHEN
BIND_FILTERS (
"_MAN_QUALITÄT_CASES" ,
"vw_IPM"."AFO_Nummer" LIKE 'aa-%' AND
"vw_IPM"."Status_Verschraubung" = 'iO'
)
THEN
'iO'
WHEN
BIND_FILTERS (
"_MAN_QUALITÄT_CASES" ,
"vw_IPM"."AFO_Nummer" LIKE 'bb_%' AND
"vw_IPM"."Status_Verschraubung" = 'niO'
)
THEN
'niO'
WHEN
BIND_FILTERS (
"_MAN_QUALITÄT_CASES" ,
"vw_IPM"."AFO_Nummer" LIKE 'bb_%' AND
"vw_IPM"."Status_Verschraubung" = 'iO'
)
THEN
'iO'
ELSE
'keine Info'
END